-
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.
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
}
} |
Beta Was this translation helpful? Give feedback.
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?
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: