Skip to content

There is no option to ignore specific symfony routes by id #906

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

Closed
gabplch opened this issue Jan 13, 2025 · 11 comments
Closed

There is no option to ignore specific symfony routes by id #906

gabplch opened this issue Jan 13, 2025 · 11 comments

Comments

@gabplch
Copy link

gabplch commented Jan 13, 2025

Problem Statement

For the only way according docs to remove profiling by some of the routes is explicitly writing it e.g.:

sentry:
  options:
    ignore_transactions:
      - 'GET /healthz'
...

But it'll be cool to put only route it to make it more reliable. For e.g Artprime prometheus metrics bundle have such an option:

    ignored_routes:
        - healthz

Solution Brainstorm

add configuration method for tracing_ignored_routes, and accept symfony route id parameter in it

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 13, 2025
@cleptric
Copy link
Member

We use Symfony's route name, prefixed with the HTTP method verb, see https://github.com/getsentry/sentry-symfony/blob/master/src/EventListener/TracingRequestListener.php#L68.

If you want to have more fine grained controlls than ignore_transactions, I recommend using a traces sampler, see https://docs.sentry.io/platforms/php/guides/symfony/configuration/sampling/#setting-a-sampling-function.

We might remove the HTTP verb in the next major version, as we already did so in our Laravel SDK.

@gabplch
Copy link
Author

gabplch commented Jan 13, 2025

I meant, that there are some 'service' routes, I'd like not to see in the profiling list.
So example below will be enough?

sentry:
  options:
    ignore_transactions:
      - 'GET my_route_id'

@cleptric
Copy link
Member

#[Route('/blog', name: 'blog_list')]
public function list(): Response
{
    // ...
}

so here you would set

sentry:
  options:
    ignore_transactions:
      - 'GET blog_list'

@gabplch
Copy link
Author

gabplch commented Jan 13, 2025

Great, thx. One more question, sentry profiling page have column for HTTP method, but it's empty. It there any way to resolve it? Or it'll be fixed in further releases?

Image

@cleptric
Copy link
Member

@gabplch
Copy link
Author

gabplch commented Jan 13, 2025

Strange things, but ok, thx, will try to bump version to 5.1 (now at 5.0)

@cleptric
Copy link
Member

Can you drop the link to the page where the method is not displayed? In case you use https://sentry.io

@gabplch
Copy link
Author

gabplch commented Jan 13, 2025

Sure, here it is: https://sentry.io/performance/

@cleptric
Copy link
Member

I would need your org subdomain as well 😄

@gabplch
Copy link
Author

gabplch commented Jan 13, 2025

Here it is: https://macpaw.sentry.io/performance/

@cleptric
Copy link
Member

Setting the HTTP method correctly was fixed in #879 which was released as part of 5.1.0.
So updating the SDK should populate the column correctly.

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

No branches or pull requests

2 participants