Skip to content

Commit f0fa9dc

Browse files
estolfopicandocodigo
authored andcommitted
Minor docs updates
Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó <[email protected]> Minor change to docs
1 parent c8a30ba commit f0fa9dc

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

docs/open-telemetry.asciidoc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
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 Ruby Client.
4+
You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your {es} requests through the Ruby Client.
55
The Ruby 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/ruby/manual/[instrumented with OpenTelemetry] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby SDK] 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/ruby/manual/[instrumented with OpenTelemetry] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby SDK] are inherently enriched with additional spans that contain insightful information about the execution of the {es} requests.
77

8-
The native instrumentation in the Ruby 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 Ruby Client. The following image shows a resulting trace in which two different Elasticsearch requests are executed, i.e. `ping` and a search `request`:
8+
The native instrumentation in the Ruby 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 layer of {es} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {es} requests: a `ping` request and a `search` request.
99

1010
[role="screenshot"]
1111
image::images/otel-waterfall-without-http.png[alt="Distributed trace with Elasticsearch spans",align="center"]
1212

13-
Usually, OpenTelemetry 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 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"]
1616
image::images/otel-waterfall-with-http.png[alt="Distributed trace with Elasticsearch spans",align="center"]
1717

18-
Advanced Ruby 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 `search` request in a scenario with two Elasticsearch nodes:
18+
Advanced Ruby 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 a `search` request in a scenario with two nodes:
1919

2020
[role="screenshot"]
2121
image::images/otel-waterfall-retry.png[alt="Distributed trace with Elasticsearch spans",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
27+
2728
When using the https://opentelemetry.io/docs/instrumentation/ruby/manual[OpenTelemetry Ruby SDK manually] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby Auto-Instrumentations], the Ruby Client's OpenTelemetry instrumentation is enabled by default and uses the global OpenTelemetry SDK with the global tracer provider. You can provide a tracer provider via the Ruby Client configuration option `opentelemetry_tracer_provider` when instantiating the client. This is sometimes useful for testing or other specific use cases.
2829

2930
[discrete]
@@ -47,19 +48,20 @@ With this configuration option you can enable (default) or disable the built-in
4748
[discrete]
4849
===== Capture search request bodies
4950

50-
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. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all.
51+
Per default, the built-in OpenTelemetry instrumentation does not capture request bodies due to data privacy considerations. You can use this option to enable capturing of search queries from the request bodies of {es} search requests in case you wish to gather this information regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all.
5152

5253
**Default:** `omit`
54+
5355
**Valid Options:** `omit`, `sanitize`, `raw`
5456

5557
|============
5658
| Environment Variable | `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY`
5759
|============
5860

5961
[discrete]
60-
===== Sanitize the elasticsearch search request body
62+
===== Sanitize the {es} search request body
6163

62-
You can configure the list of keys whose values are redacted when the search query is captured. The values should be separated by a comma.
64+
You can configure the list of keys whose values are redacted when the search query is captured. Values must be comma-separated.
6365

6466
**Default:** `nil`
6567

@@ -75,6 +77,7 @@ OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS='sensitive-ke
7577

7678
[discrete]
7779
==== Overhead
78-
The OpenTelemetry instrumentation (as any other monitoring approach) may come with a little overhead on CPU, memory and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. In case that either the instrumentation is disabled or no OpenTelemetry SDK is active with the target application, there is no monitoring overhead expected when using the client.
7980

80-
Even when the instrumentation is enabled and is being actively used (by an OpenTelemetry SDK), in the vast majority of cases the overhead is very small and negligible. In edge cases in which there is a noticable overhead the <<opentelemetry-config-enable,instrumentation can be explicitly disabled>> to eliminate any potential overhead effect of the instrumentation.
81+
The OpenTelemetry instrumentation (as any other monitoring approach) may come with a slight overhead on CPU, memory, and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. When the instrumentation is disabled or no OpenTelemetry SDK is active within the target application, monitoring overhead is not expected when using the client.
82+
83+
Even in cases where the instrumentation is enabled and is actively used (by an OpenTelemetry SDK), the overhead is minimal and negligible in the vast majority of cases. In edge cases where there is a noticeable overhead, the <<opentelemetry-config-enable,instrumentation can be explicitly disabled>> to eliminate any potential impact on performance.

0 commit comments

Comments
 (0)