How to add attachment to unhandled exception in MAUI? #3346
-
Hello there, I am wondering what is the best approach to add Attachment to unhandled exception? Let's say that once unhandled exception happens, I would like to add additional logs as attachment. I found out, that you could configure scope globally during setup
but this is not ideal, as those are added every time sentry is being used. What's more, the logs from the current session wan I also didn't find way to filter this only for exceptions. EDIT: It happened that this is not the way as this is only configured on startup. Hence, this will get latest logs and add those as attachment. When the error happens, this won't get latest logs but it will use those from startup. How do you do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey there! I think you're looking for the
|
Beta Was this translation helpful? Give feedback.
Hey there! I think you're looking for the
BeforeSend
callback. The callback provides aHint
object that takes paths as attachments that then get added to the event during later stages of eventprocessing.It'd look a bit like this