Home > OS >  Spring Sentry Integration. Event processor doesn't work (prevent health check)
Spring Sentry Integration. Event processor doesn't work (prevent health check)

Time:12-28

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: enter image description here

CodePudding user response:

EventProcessor interface has two methods:

  • SentryEvent process(SentryEvent event, Object hint) - for processing events
  • SentryTransaction 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:

I used TracesSamplerCallback (enter image description here

  • Related