Skip to content

Commit

Permalink
Update OTel head-based sampling limitation (#11959) (#11971)
Browse files Browse the repository at this point in the history
* Update sampling.asciidoc

* Update sampling.asciidoc

(cherry picked from commit d486424)

Co-authored-by: Brandon Morelli <[email protected]>
  • Loading branch information
mergify[bot] and bmorelli25 authored Oct 30, 2023
1 parent 5a6326a commit 144bcdc
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docs/sampling.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ image::./images/dt-sampling-example-2.png[Distributed tracing and head based sam

**OpenTelemetry with head-based sampling**

Head-based sampling is implemented in the APM agents and SDKs, and
requires the sample rate to be propagated between services and the APM Server.
This functionality is not currently supported by OpenTelemetry,
which results in inaccurate APM throughput, latency, and error metrics.
Head-based sampling is implemented directly in the APM agents and SDKs.
The sample rate must be propagated between services and the managed intake service in order to produce accurate metrics.

OpenTelemetry offers multiple samplers. However, most samplers do not propagate the sample rate.
This results in inaccurate span-based metrics, like APM throughput, latency, and error metrics.

For accurate span-based metrics when using head-based sampling with OpenTelemetry, you must use
a [consistent probability sampler](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/).
These samplers propagate the sample rate between services and the managed intake service, resulting in accurate metrics.

NOTE: OpenTelemetry does not offer consistent probability samplers in all languanges.
OpenTelemetry users should consider using tail-based sampling instead.
+
Refer to the documentation of your favorite OpenTelemetry agent or SDK for more information on the availability of consistent probability samplers.

[float]
[[tail-based-sampling]]
Expand Down Expand Up @@ -196,4 +205,4 @@ include::./configure/sampling.asciidoc[tag=tbs-top]
**Policy settings:**

include::./configure/sampling.asciidoc[tag=tbs-policy]
:leveloffset: -3
:leveloffset: -3

0 comments on commit 144bcdc

Please sign in to comment.