Reduce Grafana Cloud Traces costs
Control your tracing costs by strategically managing span and resource attributes in your applications.
Where you add span attributes and how many attributes you use impacts the amount of tracing data. By carefully considering how your application is instrumented to generate tracing data, you can focus the tracing data and help control costs.
For example, you determine how many attributes to include in your spans. Minimizing the number of attributes reduces costs, because each attribute adds overhead to the tracing system. In Grafana Cloud, this results in higher tracing costs.
For more details, refer to Best practices for traces.
Additional cost reduction strategies
You can consider two other options to reduce costs when using Grafana Cloud Traces:
- Adaptive Traces: Automatically retains your most valuable traces while discarding less critical data.
- Sampling: Define sampling policies to determine which traces to store and which ones to discard.
Adaptive Traces (in private preview)
Adaptive Traces, currently in private preview, helps you automatically identify and retain your most valuable traces, so that you can get the insights you need into application performance and availability, while optimizing your overall observability costs. Refer to the Adaptive Traces documentation for more information.
Sampling
Sampling is the practice of intentionally retaining only a subset of telemetry (traces, spans, logs) to control cost and overhead while preserving diagnostic value. In distributed tracing, sampling can be head-based (decided at trace start) or tail-based (decided after observing the full trace), enabling policies that keep important traces—such as those with errors or high latency—and drop the rest. Policies let you control how the sampling methods are applied. You can use sampling to reduce the cost of processing tracing data.
Refer to the Sampling documentation for information about sampling, strategies, and policies. The sampling documentation provides configuration examples for using Grafana Alloy and the OpenTelemetry Collector.