Repository navigation
Sample logs based on the trace_id sampled using tail based sampling #45857
Replies: 1 comment
|
There's no built-in way to do this in the Collector today, and it's worth understanding why before reaching for a workaround. Two structural reasons:
So "keep only the logs whose trace_id was sampled" is not something you can wire up with processors as-is. What people actually do instead, roughly in order of how common they are:
If your goal is cost (store fewer logs) rather than exact trace/log parity, option 1 is usually enough. If it's investigation fidelity (when I open a sampled trace, its logs are there), option 2 is the robust answer and avoids dropping logs you'll later wish you had. For the record there's prior art on extending trace-oriented processing to logs (e.g. #11770 for |
Uh oh!
There was an error while loading. Please reload this page.
I want to get logs only against the trace_ids which are sampled by tail based sampling processor. Is there a way of doing it in otel Collector. Please guide me.
All reactions