sentry-rust icon indicating copy to clipboard operation
sentry-rust copied to clipboard

Question -- Possible to filter out small spans?

Open rodya-mirov opened this issue 1 year ago • 0 comments
trafficstars

I'm not sure if this is a sentry question or a tracing question, but basically, I've peppered a lot of my source code with #[tracing::instrument] annotations of one form or another. All of these spans could, in some situations, be fairly costly, but often they're not.

At the same time I have a large and complex transaction I want to profile. Unfortunately it's hitting so many spans that it's hitting some maximum internal to sentry (I guess?) and the end of the transaction is getting sort of mangled. Honestly, I don't really know what's happening, since there's no error message communicating with sentry (at least that I can find), but that's my current guess.

What I'd like to do is to dynamically filter out the spans, after they're complete, but before they're updated to sentry, to remove them if they're less than 5ms (or whatever). I found some documentation but it's a bit terse, and in any case I spent a few hours on it and got nowhere. Is there a canonical solution to this?

rodya-mirov avatar Sep 23 '24 20:09 rodya-mirov