EvoMaster icon indicating copy to clipboard operation
EvoMaster copied to clipboard

OpenSearch Instrumentation Feature

Open mmiguerodriguez opened this issue 6 months ago • 2 comments

Summary

This PR adds basic instrumentation for OpenSearch operations (get and search) in EvoMaster.

The feature tracks these method calls and adds relevant information (operation, query, index, execution time) to the execution context for further analysis.

Changes

  • Added OpenSearchClientClassReplacement to intercept and instrument get and search methods of OpenSearchClient.
  • Introduced OpenSearchCommand to encapsulate operation details.
  • Updated ExecutionTracer to store OpenSearch operation info.
  • Added/updated tests in e2e-tests/spring-rest-opensearch to verify basic instrumentation.

How it works

  • When get or search is called on an OpenSearchClient, the replacement methods record the operation, arguments, and execution time.
  • This info is stored in the execution context for future usage in EvoMaster's analysis. TBD

Notes

  • No breaking changes.
  • Only basic instrumentation for now; more operations will be added in the future.

mmiguerodriguez avatar Jun 23 '25 19:06 mmiguerodriguez

Hi Andrea, this PR was made by Miguel Rodriguez, a master student that is currently working on supporting OpenSearch (https://opensearch.org/) in EvoMaster. I have already went through a review of this PR on his fork.

jgaleotti avatar Jun 25 '25 13:06 jgaleotti

@mmiguerodriguez @jgaleotti thx! I was out of town. i ll look at it in next coming days

arcuri82 avatar Jun 26 '25 12:06 arcuri82

@mmiguerodriguez thx for your first PR! sorry for delay in reviewing (busy period...).

arcuri82 avatar Jul 02 '25 07:07 arcuri82

@mmiguerodriguez could you check if you it is possible to make the PR request toward a branch with name of your choice and not master? the problem with PR from forks is that CI is not run :( so i don't see if the build would fail. if it goes to a branch, i can merge even if CI fails, and then can have another PR

arcuri82 avatar Jul 02 '25 07:07 arcuri82

@mmiguerodriguez could you check if you it is possible to make the PR request toward a branch with name of your choice and not master? the problem with PR from forks is that CI is not run :( so i don't see if the build would fail. if it goes to a branch, i can merge even if CI fails, and then can have another PR

@arcuri82 I'm not able to create a branch in this repo with name of my choice, I can select issre-update branch since it only has 1 commit ahead of master. Let me know if that is what you meant or if you expect something different.

I've already applied the changes requested.

mmiguerodriguez avatar Jul 02 '25 12:07 mmiguerodriguez

@mmiguerodriguez wait. let me create another branch :)

arcuri82 avatar Jul 02 '25 12:07 arcuri82

@mmiguerodriguez do it to external-pr-opensearch

arcuri82 avatar Jul 02 '25 12:07 arcuri82

Thanks!

mmiguerodriguez avatar Jul 02 '25 12:07 mmiguerodriguez

@mmiguerodriguez I gave you access to EM now. should have gotten a notification. from now on, can work directly on branches of EM. note: your latest PR is not merged into master yet, as we need to wait for CI

arcuri82 avatar Jul 02 '25 13:07 arcuri82

hmmm... actually #1268 is already failing. @mmiguerodriguez please look at it. @jgaleotti FYI

arcuri82 avatar Jul 02 '25 13:07 arcuri82

Will be having a look. Thanks @arcuri82

mmiguerodriguez avatar Jul 02 '25 13:07 mmiguerodriguez