-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add preview_datadog_agent_sampling
#6112
base: dev
Are you sure you want to change the base?
Conversation
CI performance tests
|
experimental_datadog_agent_sampling
preview_datadog_agent_sampling
a5f6f0a
to
928a9fa
Compare
✅ Docs Preview ReadyNo new or changed pages found. |
928a9fa
to
b1040aa
Compare
This mode will change the behaviour of the router for tracing in the following ways: * Spans are never dropped, instead they are converted to RecordOnly. * Spans that are sent to otlp and datadog exporters will always look like they have been sampled. * The `sampling.priority` attribute is populated on spans. * `psr` is populated in trace state. * `m` is populated in trace state.
b1040aa
to
a1b638d
Compare
.changesets/fix_bryn_datadog_upstream_sampling_decision_test.md
Outdated
Show resolved
Hide resolved
.changesets/fix_bryn_datadog_upstream_sampling_decision_test.md
Outdated
Show resolved
Hide resolved
.changesets/fix_bryn_datadog_upstream_sampling_decision_test.md
Outdated
Show resolved
Hide resolved
> [!IMPORTANT] | ||
> Sending all spans to the datadog agent may require that you tweak the `batch_processor` settings in your exporter config. This applies to both OTLP and the Datadog native exporter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention potential perf impacts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some documentation around setting the sampler:
https://deploy-preview-6112--apollo-router-docs.netlify.app/configuration/telemetry/exporters/tracing/datadog#sampler-configuration
…use rate based sampling from agent.
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/overview.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/overview.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/overview.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/tracing/datadog.mdx
Outdated
Show resolved
Hide resolved
.changesets/fix_bryn_datadog_upstream_sampling_decision_propagation.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Edward Huang <[email protected]>
Co-authored-by: Edward Huang <[email protected]>
Co-authored-by: Edward Huang <[email protected]>
Co-authored-by: Edward Huang <[email protected]>
@shorgi Thank you for all the docs improvements! |
e792674
to
266ebd9
Compare
266ebd9
to
43aa702
Compare
Respect x-datadog-sampling-priority (PR #6017)
This PR consists of two fixes:
Datadog priority sampling resolution is not lost.
Previously a
x-datadog-sampling-priority
of-1
would be converted to0
for downstream requests and2
would be converted to1
.The sampler option in the
telemetry.exporters.tracing.common.sampler
is not datadog aware.To get accurate APM metrics all spans must be sent to the datadog agent with a
psr
orsampling.priority
attribute set appropriately to record the sampling decision.preview_datadog_agent_sampling
option in the router.yaml enables this behavior and should be used when exporting to the datadog agent via OTLP or datadog native.By using these options, you can decrease your Datadog bill as you will only be sending a percentage of spans from the Datadog agent to datadog.
Important
Users must enable
preview_datadog_agent_sampling
to get accurate APM metrics.Important
The Router does not support
in-agent
ingestion control.Configuring
traces_per_second
in the Datadog agent will NOT dynamically adjust the Router's sampling rate to meet the target rate.Important
Sending all spans to the datadog agent may require that you tweak the
batch_processor
settings in your exporter config. This applies to both OTLP and the Datadog native exporter.By @BrynCooke in #6017
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩