A Practical Answer for Teams Running Multi-Team Operations
The best way to control OpenTelemetry sampling cost is to combine a modest head sampling policy at the SDK with tail-based decisions in a collector or tracing backend. Start with a 1:10 or 1:20 ratio, keep 100% of errors, timeouts, and explicitly critical business operations, and route the rest to a cheaper storage tier. For multi-team command-center software, that usually means keeping a complete short window during incidents instead of paying to retain every routine trace forever. The exact saving depends on span volume, backend storage price, log volume, and how long you keep data, so teams should measure before and after rather than assume a fixed percentage. A reasonable default in 2026 is to keep 5% of normal traces for 7 to 14 days, keep 100% of alert-linked traces for 30 days, and revisit the policy monthly.
Also worth reading: How does AI governance runtime control transform policy enforcement into actionable leadership oversight? · How does multi-team SaaS cost governance optimize financial control across distributed operations? · Why Is an Enterprise AI Agent Control Plane Becoming Core Infrastructure?
Sampling is not one switch. The SDK sampler decides whether a trace is recorded at the start of a request, while a collector processor can filter spans later, and a backend may apply its own retention or priority policy. Head sampling is cheap and predictable because it reduces data before it leaves the process. Tail sampling is more useful for operations because it can keep the traces that show errors, latency, or unusual business events, but it requires buffering and careful rules. The right answer is not always the highest sampling rate. It is a policy that preserves evidence when a customer, a delivery, a payment, or a mission-critical workflow fails.
Why OpenTelemetry Sampling Becomes a Cost Problem
Tracing cost is driven by more than the number of requests. A single trace can contain 40, 80, or several hundred spans across gateways, services, databases, queues, and scheduled jobs. If each span is stored for 30 days, the monthly bill can become much larger than the compute cost of generating the telemetry. A 10% sampling rate sounds small until a service handles 2 million requests per day and every retained request carries an average of 60 spans. The arithmetic produces roughly 12 million sampled requests and 720 million spans, before collector processing, indexing, and egress are counted.
That growth is especially awkward in B2B command-center platforms, where several teams may share one tenant, one support queue, one integration layer, and one customer escalation process. Team A may want rich traces for a workflow builder, while Team B may produce a large number of healthy background jobs. Team C may own a noisy feature that adds high-cardinality attributes to every span. Without ownership rules, the noisiest team can consume most of the storage budget while the team handling the customer incident loses the context it needs. Cost control therefore includes telemetry hygiene, not only a sampler setting.
OpenTelemetry itself does not set a universal storage price. CloudWatch, Datadog, New Relic, Grafana Cloud, Honeycomb, Elastic, and other backends price ingestion, retention, queries, scans, and network transfer differently. The same trace can therefore cost very different amounts across providers. AWS CloudWatch, for example, has changed its telemetry ingestion model, and Datadog charges by indexed spans in many configurations. Teams should calculate cost per sampled trace and cost per retained incident, then compare that with the operational value of each trace. A $0.02 routine trace is not automatically cheap when the system produces 10 million of them each month.
Head Sampling Versus Tail Sampling
Head sampling happens inside the application SDK or agent before most span data is exported. It is simple, has low processing overhead, and works well when the whole organization accepts a fixed reduction in visibility. A parent-based TraceIdRatioBased sampler can keep a consistent ratio, while ParentBased behavior helps avoid breaking the relationship between a parent trace and its child spans. The downside is that a head sampler cannot know whether a trace will later fail. It may drop the one trace that explains a failed escalation, even if the overall traffic looks healthy.
Tail sampling receives spans, waits until enough of the trace has arrived, and then decides whether to keep the full trace. It is better suited to error budgets, incident response, and high-value business events. Typical rules keep traces with an error status, traces above a latency threshold, or traces linked to a priority tenant. Tail sampling needs a memory buffer, an adequate wait window, and a collector configuration that avoids dropping spans before the decision is made. If a trace takes longer to complete than the decision window, the backend may see a partial trace. That is acceptable for some workloads, but it weakens the promise of keeping every incident trace in full.
| Control choice | Main benefit | Main weakness | Good starting point |
|---|---|---|---|
| Head sampling | Low overhead and predictable volume | Cannot know if a trace will fail | Keep 5% of routine traces |
| Tail sampling | Keeps errors and slow traces | Uses memory and requires careful timing | Keep all error traces, with a 30-60 second window |
| Adaptive sampling | Adjusts pressure to backend load | More policy and operational complexity | Use only after volume is measured |
| Backend retention | Controls storage age and query cost | Does not reduce ingestion or processing | Keep 7-14 days for routine traces |
| Attribute filtering | Removes noisy or sensitive metadata | Can remove diagnostic fields | Drop high-cardinality fields before export |
A Step-by-Step Policy That Teams Can Actually Run
The first step is to measure a representative day. Record the number of exported spans, traces, ingest bytes, collector CPU, memory, backend queries, and monthly invoice for at least 7 days. Include a peak period, because a command-center platform may have a sharp operational load when customers escalate incidents. A typical starting target is to reduce routine trace volume by 50% to 80% within 30 days, while keeping the incident trace retention path at 100%. The target is a planning assumption, not a guaranteed saving, because backend prices and trace sizes differ.
The second step is to separate routine and critical traffic. Mark errors, timeouts, rejected jobs, and selected business failures with attributes that a collector can evaluate. Keep all traces with those markers, but avoid using broad labels that catch nearly every request. For example, a workflow name is useful when it has fewer than 100 values, while a raw request URL or full customer query can create very high cardinality. Keep a small allowlist of fields such as tenant tier, region, service, operation, outcome, and incident class. A useful default is to retain 30 days of incident traces, 14 days of routine traces, and 90 days of a short sanitized error summary.
The third step is to apply a conservative head policy first. In many systems, keeping 10% of traces and then applying tail rules is easier to reason about than starting with 1% tail sampling across a large fleet. If volume is still too high, test 5%, 2%, or 1% on non-critical environments. Compare the proportion of known incidents with a retained trace, not just the total span count. A 2% rate can be entirely acceptable if errors and critical workflows are kept. It can still be poor if the organization has no way to mark the traces that matter.
Cost, Pricing, and the Numbers to Track
The most useful cost metric is cost per retained diagnostic trace, not cost per exported span. Track the number of traces kept by the collector, the number of spans inside those traces, and the number of useful investigations completed. A team that cuts 90% of volume but needs three times as many queries or log searches may not have saved anything meaningful. Another useful metric is incident coverage: what percentage of production incidents have at least one complete trace available within 15 minutes of the alert. Setting a target of 95% or higher is reasonable for important customer workflows, but teams should adjust the target based on the cost of missing evidence.
Backends can charge different units, so a simple ratio is not enough. A 1:20 sampler reduces exported traces by roughly 95%, assuming every trace is equally likely to be selected. If each trace averages 50 spans, the span count should also fall by roughly 95%. Actual savings may be lower because errors, metadata, logs, and metrics remain in the bill, and they may be higher when the retained traces are larger than average. A team should sample 1,000 traces, count their average span size, and multiply by the provider's current ingestion, retention, and query prices before changing production policy. Prices can change, so verify the provider calculator on the same day the estimate is made.
For leadership reporting, present three numbers: routine monthly telemetry cost, critical incident telemetry cost, and cost per resolved incident. The third number makes the trade-off easier to discuss than a raw invoice. If lowering routine retention by 30 days saves $4,000 per month and costs the on-call team two extra hours per major incident, that may still be a good trade. If it creates a gap in a regulated or high-value workflow, the cheaper policy may be the wrong one. Cost control is a management decision tied to service quality, not a purely technical optimization.
Common Mistakes That Make Sampling Worse
The most common mistake is sampling only errors after the backend has already accepted every span. That can improve retrieval relevance, but it does little to reduce ingestion and processing cost. Another mistake is using a global percentage without a parent-based strategy, which can produce broken traces when services make different decisions. Teams also make the mistake of treating all environments equally. Production may need 100% of critical failures while staging can keep 1% or none, provided staging tests the telemetry pipeline with synthetic events.
High-cardinality attributes are another frequent source of cost. Tags such as full URLs, SQL statements, payload fragments, and unique request text can inflate indexes and storage. Filtering them at the SDK is often better than deleting them later. The opposite mistake is removing too much metadata. If the remaining trace has no service name, region, tenant tier, or operation name, engineers may be unable to tell whether an error is isolated or systemic. Keep enough metadata to answer a question, not enough to archive a database dump. Review the attribute set every quarter with the teams that actually use it.
Finally, many organizations set a sampler and forget it. Traffic changes, new services appear, and a background job may start producing 70% of all spans. A policy that was reasonable at 100,000 traces per day may be wasteful at 10 million. Add an alert when daily trace volume changes by more than 25% week over week, and review the top ten services by span count. Do not react to a single spike, but do investigate a sustained change. Sampling should have an owner, a review date, and a rollback path.
When to Use Each Approach Across Multi-Team Operations
Use head sampling as the default cost floor for mature production systems with predictable traffic. It works well for internal tools, asynchronous jobs, and environments where the organization mainly needs a representative performance view. Use tail sampling when incident evidence has high business value, especially for multi-tenant platforms, payment or order workflows, and customer-facing command centers. Keep the head ratio high enough that the tail sampler receives a meaningful candidate set, but low enough that the collector buffer is not overwhelmed. In many deployments, 5% to 10% head sampling plus 100% error retention is a better starting point than 100% export followed by a large filtering stage.
For AI features and agent workflows, sampling decisions need extra care. A model call may be expensive, slow, or unsafe, and the trace may be valuable even when the application returns HTTP 200. Keep traces for tool failures, guardrail interventions, long-running tasks, and a small sample of successful runs. That gives the team a baseline for quality and cost without storing every prompt and response-related span. The same principle applies to scheduled reconciliation jobs: keep failures and long runs, while reducing healthy repetitive jobs.
By September 2026, teams should treat sampling as part of platform governance. OpenTelemetry's sampling concepts have matured, and the broader ecosystem now supports Prometheus and CloudWatch integrations, but tooling does not remove the need for an explicit policy. A central platform team should publish a default ratio, allow service owners to request exceptions, and review those exceptions against actual usage. Exceptions should expire after 30 or 90 days. This prevents a temporary incident from becoming a permanent, expensive telemetry contract.
A Recommended Default for 2026
For a B2B command-center SaaS platform, a sensible starting policy is 10% head sampling for normal requests, 100% retention for errors and critical workflow failures, and a tail-sampling window of 30 to 60 seconds. Store routine traces for 7 days, incident traces for 30 days, and selected audit summaries for 90 days. Sample background jobs at 1% to 5%, depending on their span volume, and keep their failures at 100%. Use a 1:10 or 1:20 ratio only after checking that the collector can handle the target volume and that the cost reduction is visible on the invoice.
Run the policy in shadow mode or with a limited service group before applying it everywhere. Compare the retained traces with a known incident set, ask on-call engineers whether the traces answered their questions, and measure storage, ingestion, and query charges. If incident coverage falls below 95%, raise the ratio or add a targeted rule. If routine cost remains high but incident coverage is strong, lower retention or move routine traces to a lower-cost backend. The right operating model is continuous measurement, not a permanent belief that one sampling percentage is correct for every team.