Skip to content

Commit 39077eb

Browse files
committed
Use shared attrbute for Elasticsearch
1 parent 4d555ba commit 39077eb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/setup/open-telemetry.asciidoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[[opentelemetry]]
22
=== Using OpenTelemetry
33

4-
You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your Elasticsearch requests through the Java API Client.
4+
You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your {es} requests through the Java API Client.
55
The Java API Client comes with built-in OpenTelemetry instrumentation that emits https://www.elastic.co/guide/en/apm/guide/current/apm-distributed-tracing.html[distributed tracing spans] by default.
6-
With that, applications https://opentelemetry.io/docs/instrumentation/java/manual/[instrumented with OpenTelemetry] or running the https://opentelemetry.io/docs/instrumentation/java/automatic/[OpenTelemetry Java Agent] are inherently enriched with additional spans that contain insightful information about the execution of the Elasticsearch requests.
6+
With that, applications https://opentelemetry.io/docs/instrumentation/java/manual/[instrumented with OpenTelemetry] or running the https://opentelemetry.io/docs/instrumentation/java/automatic/[OpenTelemetry Java Agent] are inherently enriched with additional spans that contain insightful information about the execution of the {es} requests.
77

8-
The native instrumentation in the Java API Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for Elasticsearch]. In particular, the instrumentation in the client covers the logical Elasticsearch request layer, thus, creates a single span per request the service executes against the Java API Client. The following image shows a resulting trace in which three different Elasticsearch requests are executed, i.e. an `index`, `get` and a search `request`:
8+
The native instrumentation in the Java API Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for {es}]. In particular, the instrumentation in the client covers the logical {es} request layer, thus, creates a single span per request the service executes against the Java API Client. The following image shows a resulting trace in which three different {es} requests are executed, i.e. an `index`, `get` and a search `request`:
99

1010
[role="screenshot"]
11-
image::images/otel-waterfall-instrumented-without-http.jpg[alt="Distributed trace with Elasticsearch spans",align="center"]
11+
image::images/otel-waterfall-instrumented-without-http.jpg[alt="Distributed trace with {es} spans",align="center"]
1212

13-
Usually, OpenTelemetry agents and auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical Elasticsearch client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, Elasticsearch spans (in blue) and the corresponding HTTP-level spans (in red):
13+
Usually, OpenTelemetry agents and auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {es} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {es} spans (in blue) and the corresponding HTTP-level spans (in red):
1414

1515
[role="screenshot"]
16-
image::images/otel-waterfall-instrumented.jpg[alt="Distributed trace with Elasticsearch and HTTP spans",align="center"]
16+
image::images/otel-waterfall-instrumented.jpg[alt="Distributed trace with {es} and HTTP spans",align="center"]
1717

18-
Advanced Java API Client behavior such as nodes round-robin and request retries are revealed through the combination of logical Elasticsearch spans and the physical HTTP spans. The following example shows an `index` request in a scenario with two Elasticsearch nodes:
18+
Advanced Java API Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {es} spans and the physical HTTP spans. The following example shows an `index` request in a scenario with two {es} nodes:
1919

2020
[role="screenshot"]
2121
image::images/otel-waterfall-retries.jpg[alt="Distributed trace with request retries",align="center"]
2222

23-
The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical Elasticsearch request span (in blue).
23+
The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {es} request span (in blue).
2424

2525
[discrete]
2626
==== Setup the OpenTelemetry instrumentation
@@ -57,7 +57,7 @@ With this configuration option you can enable (default) or disable the built-in
5757
[discrete]
5858
===== Capture search request bodies
5959

60-
Per default, the built-in OpenTelemetry instrumentation does not capture request bodies because of data privacy reasons. You can use this option to enable capturing of search queries from the the request bodies of Elasticsearch search requests in case you wish to capture this information, regardless.
60+
Per default, the built-in OpenTelemetry instrumentation does not capture request bodies because of data privacy reasons. You can use this option to enable capturing of search queries from the the request bodies of {es} search requests in case you wish to capture this information, regardless.
6161

6262
**Default:** `false`
6363

0 commit comments

Comments
 (0)