|
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 ? |
Answered by
romtsn
Jul 15, 2024
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
}
} |
2 replies
Answer selected by
kikmak42
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, sorry I'm not sure I got your problem exactly - would you like to filter out some certain sentry events?
inAppExcludeis not meant for that, it's meant for marking some stackframes asin-appor 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: