-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instrumentation API usage and native OpenTelemetry implementation #771
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions bot
pushed a commit
that referenced
this pull request
Dec 21, 2023
…#771) * Initial otel instrumentation implementation * add otel integration into esapi * add tests for instrumentation integration within both APIs * query persistence logic is embedded in otel instrumentation * regroup cluster id and node name test in AfterResponse * bump go.mod to 1.20, add opentelemetry dependency * rename RecordQuery to RecordRequestBody * add esapi integration for otel traces * add typedapi integration for otel traces * pin transport to commit 903383c until release * update internal dependencies * replace nilcheck in typedapi with type assertion * add changelog for 8.12.0 with otel * fix naming to please linting * update examples dependencies * go mod tidy for xkcdsearch
Anaethelion
added a commit
that referenced
this pull request
Dec 21, 2023
…#771) (#772) * Initial otel instrumentation implementation * add otel integration into esapi * add tests for instrumentation integration within both APIs * query persistence logic is embedded in otel instrumentation * regroup cluster id and node name test in AfterResponse * bump go.mod to 1.20, add opentelemetry dependency * rename RecordQuery to RecordRequestBody * add esapi integration for otel traces * add typedapi integration for otel traces * pin transport to commit 903383c until release * update internal dependencies * replace nilcheck in typedapi with type assertion * add changelog for 8.12.0 with otel * fix naming to please linting * update examples dependencies * go mod tidy for xkcdsearch Co-authored-by: Laurent Saint-Félix <laurent.saintfelix@elastic.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the integration of the instrumentation found in the transport. elastic/elastic-transport-go#18
A default OpenTelemetry implementation can be set in the configuration with the
elasticsearch.NewOpenTelemetryInstrumentation
. If no provider is given, the instrumentation will fallback to the one set within theotel
package.Optionally, search request bodies can be recorded, such endpoints are:
search
async_search.submit
msearch
eql.search
terms_enum
search_template
msearch_template
render_search_template
More about what is recorded in the Semantic Conventions for Elasticsearch.