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

ignore_transactions option should support regular expressions #1560

Open
enumag opened this issue Jul 3, 2023 · 5 comments
Open

ignore_transactions option should support regular expressions #1560

enumag opened this issue Jul 3, 2023 · 5 comments

Comments

@enumag
Copy link
Contributor

enumag commented Jul 3, 2023

Problem Statement

Currently ignore_transactions option is useless for anything but the most simplest cases such as GET /health. Any URLs with a variable somewhere in the path (typically an id or slug) can't be ignored using this option. The option was added to remove the need of fiddling with TracesSampler or BeforeSendProcessor but in these cases custom modifications of one of those are still necessary.

Solution Brainstorm

In my opinion the ignore_transactions option should support regular expressions for the provided URLs.

@cleptric
Copy link
Member

A transaction name should not contain any variables and should instead be fully parameterized. Like /users/edit/1 should become /users/edit/{id} or similar.
While we cannot enforce this in the PHP SDK, it's essential to do this manually, as the whole experience of the performance product is built around transactions being properly bucketed.

Hence I can't entirely agree with the sentiment that this option is useless, especially as our Laravel and Symfony SDKs set a parametrized transaction name by default.

@enumag
Copy link
Contributor Author

enumag commented Jul 24, 2023

I see, I was unaware that the transaction name contains placeholders. I'm using sentry-symfony so presumably this is already the case there. In that case I think you can close this. Thank you for explaining!

@cleptric
Copy link
Member

I'll leave this open, as I agree with you that having regex support for ignore_transactions and ignore_exceptions might benefit some folks.

I personally prefer these options to be explicit, but supporting both ways is definitely a nice-to-have feature.

@enumag
Copy link
Contributor Author

enumag commented Jul 24, 2023

I'd recommend adding a note to the documentation of ignore_transactions about how the transaction names work. I thought it was simply the URL and was unaware that it contains (or is supposed to contain) placeholders.

@cleptric
Copy link
Member

Yep, I can take a look and improve the docs around this.
The way I envisioned it was that folks go to https://sentry.io/performance and copy the name of the transaction they want to ignore.

@cleptric cleptric added this to the 4.0 milestone Oct 18, 2023
@cleptric cleptric removed this from the 4.0 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

4 participants