Build Cloud Trace sampling configurations with per-service overrides and propagation format settings.
Build Cloud Trace sampling configurations with per-service overrides, URL filters, and propagation format settings.
Required Fields
projectIdtracingConfig.samplingRateOutput will appear here...The builder requires projectId and tracingConfig.samplingRate to resolve, the minimum needed to identify the project and set a baseline sampling behavior; per-service overrides, URL filters, and propagation settings are validated as well-formed but their tuning against actual traffic patterns and debugging needs is left to you.
Build a Cloud Trace sampling configuration with per-service sampling overrides, URL exclusion filters, and propagation format settings. Trace's classic head-based sampler is rate-limited rather than a clean percentage in high-QPS services (roughly capped around 1 QPS per server by default before OpenTelemetry-based export), which is why services fronting heavy traffic need an explicit lower samplingRate override rather than relying on defaults tuned for moderate load. Payment or other high-value paths often go the opposite direction, an explicit 1.0 override, accepting the storage/export cost for full visibility on the path that matters most during an incident.
An SRE investigating a rare timeout in the payment-service can't find a single relevant trace after two days of the issue recurring intermittently, because the service inherited the project-wide default samplingRate of 0.1 and the timeout happens on well under 1% of requests, so the odds of it landing in the sampled 10% on any given occurrence are low. They use the builder to add a service-specific override in tracingConfig.overrides setting payment-service to samplingRate 1.0 temporarily, and within an hour of the change going live, the next occurrence of the timeout produces a full trace showing the actual slow downstream call.
A service-level override with a very low samplingRate for cost control can make debugging a rare intermittent bug practically impossible, since the odds of capturing the problematic request in a trace drop with the rate, consider a temporary override bump during active investigation rather than leaving sampling permanently too sparse to be useful.
Mixing the legacy per-QPS-capped sampler with an OTel probabilistic sampler across services in the same trace can produce misleadingly sparse traces where some services show spans and others don't, for reasons unrelated to actual request volume.
maxNumberOfAttributes and the other span limits (32 attributes, 32 annotations, 128 message events by default) silently truncate anything beyond the cap rather than erroring, a span with 40 custom attributes quietly loses the last 8 with no warning in the trace UI.
For the OpenTelemetry-based export path shown here, yes, it's a probabilistic sampler ratio (0.1 means roughly 10% of traces are kept). The legacy Cloud Trace agent's default behavior is instead a rate-limited sampler capped near 1 QPS regardless of total traffic, so if you're mixing old agent-based instrumentation with new OTel-based config, verify which sampler is actually active before assuming the rate means what you expect.
No, excludePatterns stops those requests from being sampled or exported at all, they don't count toward your Trace quota and produce zero trace spans. This is different from sampling them at a lower rate, it's a hard exclusion, useful for pure infrastructure noise like health checks that would never be useful to investigate individually.
Trace context won't link across the boundary, each service will start a new, disconnected trace instead of continuing the caller's. additionalFormats lets a service accept multiple incoming formats during a migration window, but for a trace to stay connected end-to-end, every hop in the request path needs to both emit and accept a shared format.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.