Skip to content

Conversation

@jaydeluca
Copy link
Member

Related to #13468

This PR covers all of the elasticsearch instrumentation

  • Adds descriptions
  • Documents the configurations
  • Enable span and metric collection
  • Refactor tests to be able to test when the experimental flag is enabled or disabled, allowing us to generate separate telemetry and document the differences in telemetry emitted (part of Separate test suites for different configurations #14128)
  • Small update to the bash script that runs them all (i recently created an issue to look at rewriting this Test Telemetry Generator #14161)

@jaydeluca jaydeluca requested a review from a team as a code owner July 1, 2025 00:25
DbIncubatingAttributes.DbSystemIncubatingValues.ELASTICSEARCH),
equalTo(maybeStable(DB_OPERATION), "RefreshAction")));

if (Boolean.getBoolean("testExperimental")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you added testExperimental only to tell whether tests are run with experimental flag then you could have used otel.instrumentation.elasticsearch.experimental-span-attributes too as it is also a system property. Keeping testExperimental is fine too.

DbIncubatingAttributes.DbSystemIncubatingValues.ELASTICSEARCH),
equalTo(maybeStable(DB_OPERATION), "ClusterHealthAction")));

if (Boolean.getBoolean("testExperimental")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option would be to use something like equalTo(ELASTICSEARCH_ACTION, experimental("ClusterHealthAction")) where experimental() would return null when the experimental flag is not set. This could result in more compact assertions. Up to you to decide which way you like more.

Copy link
Member Author

@jaydeluca jaydeluca Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like your approach better, thank you for the suggestion

@laurit laurit merged commit 1d3f603 into open-telemetry:main Jul 14, 2025
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants