Fork me on GitHub
#clj-otel
<
2024-05-07
>
stopa15:05:46

Hey team, noob question: what do you usually do for sampling? Context: I have a handler for messages types a b c. The problem: c can come in with 1000+ requests / second, while a & b should not. I know I can give a root sampler, but it feels weird to do in this case, as I really only want to sample c. I would love to sample based on the event type. Like a sample-rate I could provide to with-span! Is this how you would approach it? Or would you try something different?

steffan15:05:25

To be honest I don't have a comprehensive answer yet for trace sampling in the application. My current understanding is that spans should always be created, but only sampled traces are exported. I fully acknowledge I need to develop some support and guidance on trace sampling in clj-otel, it's on my to-do list!

steffan15:05:48

When I last looked at trace sampling, I noted that some backends perform some degree of trace sampling, but I don't have first-hand experience.

stopa15:05:20

clj-otel rocks, thanks for the quick response @U2C6SPLDS!

1