-
I'm using sentry to capture errors but I want only for specified package and not from all packages and not even from activities from my app. Is this the correct way of doing it or should be done via some other configuration ?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
hi, sorry I'm not sure I got your problem exactly - would you like to filter out some certain sentry events? If you would like some events to be dropped, you can use as mentioned here, but check for events from the lib that you'd like to capture: SentryAndroid.init(context) { options ->
options.beforeSend = SentryOptions.BeforeSendCallback { event, hint ->
if (event.exceptions?.any { exception ->
exception.stacktrace?.frames?.any { frame -> frame.module?.startsWith("com.example.lib") == true } == true
} == true) {
return@BeforeSendCallback event
}
null
}
} |
Beta Was this translation helpful? Give feedback.
hi, sorry I'm not sure I got your problem exactly - would you like to filter out some certain sentry events?
inAppExclude
is not meant for that, it's meant for marking some stackframes asin-app
or not, but not really for filtering out the events.If you would like some events to be dropped, you can use as mentioned here, but check for events from the lib that you'd like to capture: