Sampling

Sample your traces

Distributed traces provide an additional layer of context for solving problems across complex systems that include hundreds or thousands of microservices. However, you want to ensure you're ingesting only tracing data that's relevant and valuable. To help control costs and maximize the usefulness of your tracing data, you can narrow your focus to only a representative sample of your data and drop everything else.

You can use head sampling or tail sampling to manage the tracing data you keep and discard:

  • Head sampling is a more blunt strategy that seeks to make a sampling decision as early as possible. Head sampling evaluates only a defined percentage of traces to take a representative sample of whole traces.
  • Tail sampling is more fine-grained, and evaluates every trace after assembling all spans. Tail sampling rules can consider request outcomes, such as whether a request succeeded or how long it took to complete, which isn't possible with head sampling.