diff --git a/docs/docs/configuration/sampling-tracetest-spans.mdx b/docs/docs/configuration/sampling-tracetest-spans.mdx index eede043172..646a53ad50 100644 --- a/docs/docs/configuration/sampling-tracetest-spans.mdx +++ b/docs/docs/configuration/sampling-tracetest-spans.mdx @@ -91,6 +91,22 @@ service: exporters: [otlp/jaeger] ``` +### Tail sampling approach +Before December 2023, we were suggesting people to use tail sampling to filter the traces generated by tracetests. +However, the new `filter` capabilities are better for performance than tail sampling as it +requires less memory to decide if a trace should be sampled or not. But even with those arguments you still want to use the +tail sampling approach, this is the processor you can use: + +```yaml +processors: + tail_sampling: + decision_wait: 5s + policies: + - name: tracetest-spans + type: trace_state + trace_state: { key: tracetest, values: ["true"] } +``` + With this configuration, you will still get 5% of all your traces, but you will also ensure that all your test traces are collected and sent to Jaeger.