Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/cost-management-and-billing/analyze-costs/reduce-costs/traces-costs.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/cost-management-and-billing/analyze-costs/reduce-costs/traces-costs/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
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 these options to reduce costs when using Grafana Cloud Traces:
- Reduce individual trace size: Fix instrumentation patterns, set SDK limits, and filter in your collector pipeline to reduce the byte size of individual 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
Adaptive Traces 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.
Was this page helpful?
Related resources from Grafana Labs


