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

Filtering healthcheck transactions with sentry-opentelemetry-agent V8 #3840

Closed
jebbench opened this issue Nov 1, 2024 · 6 comments
Closed
Assignees

Comments

@jebbench
Copy link

jebbench commented Nov 1, 2024

Problem Statement

I want to filter out my healthcheck transactions (grpc.health.v1.Health/Check, PING), preferably configured using an Environment variable.

I am using the new version of the sentry-opentelemetry-agent which works great, my only issue is filtering out healthcheck transactions.

Solution Brainstorm

In a perfect world I could provide an environment variable with a list of transactions to exclude (SENTRY_EXCLUDE_TRANSACTIONS=grpc.health.v1.Health/Check,PING) but I would settle for being able to configure it in code while still being able to take advantage of the auto initialisation (I've tried calling Sentry.init and just specifying a beforeSendTransaction options but I get the error "DSN is required. Use empty string or set enabled to false in SentryOptions to disable SDK.").

@adinauer
Copy link
Member

adinauer commented Nov 4, 2024

Thanks for the feedback, happy you like the agent!

We'll take a look at options to solve this and report back here.

@adinauer
Copy link
Member

adinauer commented Nov 4, 2024

@jebbench have you taken a look at https://docs.sentry.io/concepts/data-management/filtering/#transactions-coming-from-health-check by any chance? It could help reduce the issue until we implement something to filter them out in the SDK and not send them at all.

@jebbench
Copy link
Author

jebbench commented Nov 4, 2024

@adinauer I have and we've got the filter enabled, unfortunatly the patterns are all based on HTTP requests (they work great for filtering our /healthz eps) but they don't match GRPC or Redis requests (grpc.health.v1.Health/Check and PING).

I did send feedback in the app to ask about adding the GRPC service (as it's a standard GRPC service used by Kubernetes and the likes) but I've not heard back.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 4, 2024
@adinauer
Copy link
Member

adinauer commented Nov 4, 2024

@jebbench I've relayed this internally and hope that someone will take a look at your feedback regarding filtering GRPC health checks in product / relay soon.

@adinauer
Copy link
Member

adinauer commented Nov 8, 2024

We're planning to implement a filter very similar to what you suggested. There's also an existing issue (#2660) and JS SDK also has something similar (https://docs.sentry.io/platforms/javascript/guides/express/configuration/filtering/#filtering-transaction-events).

Our goal is to have this implemented and released as part of another v8 beta soon.

@adinauer
Copy link
Member

We have just released 8.0.0-beta.2 of the Java SDK, which allows you to configure transactions you want to ignore based on their name. There's some examples in the description of #3871 . If you decide to give it a try, feedback would be great.

@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants