Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a way to filter our some paths #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ltouati
Copy link

@ltouati ltouati commented Apr 26, 2024

When using the rocket file server, a lot of transactions are sent to sentry. Adds a configuration parameter to filter a series of paths

@Hugo-C
Copy link
Contributor

Hugo-C commented Apr 26, 2024

I am also interrested in this feature !
I'll take a look at the PR.
Did you see/try trace_sampler ? It could be a viable option that is more flexible but I didn't find an example on how to use it yet.

@intgr
Copy link
Owner

intgr commented Apr 27, 2024

Sentry documentation describes a traces_sampler callback function which can make decisions about which transactions get sampled and at what rate.

https://docs.sentry.io/platforms/rust/configuration/sampling/

The documentation says it's not supported by Rust yet, but looks like a few relevant pull requests have actually been merged, maybe the documentation is just outdated.

That seems like a more flexible approach. And if Sentry SDK already provides similar functionality, it's best not to duplicate it.

@intgr
Copy link
Owner

intgr commented Apr 27, 2024

Ah sorry, Hugo-C already mentioned traces_sampler. I hadn't read his comment yet :)

@Hugo-C
Copy link
Contributor

Hugo-C commented Apr 28, 2024

The traces_sampler does work (tested here). Ideally we have to find a way for users to set it on fairing initialisation, maybe something like Rocket's Shield ? So some big changes on how RocketSentry have to be initialized 😅
The big plus of traces_sampler is that indeed it allows to set a lower rate instead of completely filter it out.

@Hugo-C
Copy link
Contributor

Hugo-C commented May 5, 2024

If no one plans to work on this ticket, I'll give it a go next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants