Skip to content
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

[8.8] Update OTel head-based sampling limitation (backport #11959) #11970

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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