I need to prevent sending some events by condition. (health check)
I'm using spring libraries:
implementation "io.sentry:sentry-spring-boot-starter:5.4.1"
implementation "io.sentry:sentry-logback:5.4.1"
It works, sentry has a lot of transactions etc. The configuration is:
sentry:
dsn: https://....ingest.sentry.io/....
traces-sample-rate: 1.0
I'm going to prevent some events which has health check data using event processor:
CodePudding user response:
EventProcessor
interface has two methods:
SentryEvent process(SentryEvent event, Object hint)
- for processing eventsSentryTransaction process(SentryTransaction transaction, Object hint)
- for processing transactions
Since you want to filter out transactions created from requests to the health endpoint, you need to implement the second method that takes SentryTransaction
as the first parameter.
CodePudding user response: