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

docs: trace sampling probability #5129

Merged
merged 3 commits into from
May 14, 2024
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
9 changes: 5 additions & 4 deletions docs/source/configuration/telemetry/apollo-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ Your subgraph libraries must support federated tracing (also known as FTV1 traci
- Consult your library's documentation to learn how to enable federated tracing.
- If you use Apollo Server with `@apollo/subgraph`, federated tracing support is enabled automatically.

### Trace sampling rate
### Subgraph trace sampling

By default, the Apollo Router requests subgraph trace data for 1% of operations. In most cases, this provides a sufficient sample size while minimizing latency for most operations (traces can affect latency because they increase the size of subgraph response payloads).
By default, the Apollo Router requests subgraph trace data from operations with a 1% sampling probability per operation. In most cases, this provides a sufficient sample size while minimizing latency for most operations (traces can affect latency because they increase the size of subgraph response payloads).

You can customize your router's trace sampling rate by setting the following options in your [YAML config file](./overview/#yaml-config-file):
You can customize your router's trace sampling probability by setting the following options in your [YAML config file](./overview/#yaml-config-file):

```yaml title="router.yaml"
telemetry:
apollo:
# In this example, the router will request traces for 50% of requests.
# In this example, the trace sampler is configured
# with a 50% probability of sampling a request.
# This value can't exceed the value of tracing.common.sampler.
field_level_instrumentation_sampler: 0.5

Expand Down
Loading