clj-otel

2024-05-07T15:15:46.903609Z

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?

steffan 2024-05-07T15:49:25.712529Z

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!

steffan 2024-05-07T15:52:48.994459Z

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.

2024-05-09T15:02:20.412629Z

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

🙇🏼 1