Skip to content

Conversation

@Anaethelion
Copy link
Contributor

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 the otel 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.

@Anaethelion Anaethelion merged commit 67adbfc into main Dec 21, 2023
@Anaethelion Anaethelion deleted the otel_integration branch December 21, 2023 14:29
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants