You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the ability to attach on hard crash only #1467
Users have the use case of attaching files only when a hard crash happens (i.e: UncaughtExceptionHandler).
For example: User throws ParseException which has the path to a file that failed parsing.
Currently there's no way to hook into processing that exception in a way that we can add that file as an attachment.
Is there any update on this? I still need it, but of course can look into alternative solutions if it's not going to be implemented. I am just not sure if I should wait or not.
Suggestion for implementation that would have to be discussed with Client Infra TSC as this might be something all SDKs should do. If so the SDKs should do it in a similar manner.
Add a new method to EventProcessor that allows people to extract attachments from an exception. public List<Attachment> extractAttachments(SentryEvent event)
Default implementation could be added to return an empty list.
Activity
Nohus commentedon Sep 7, 2021
Is there any update on this? I still need it, but of course can look into alternative solutions if it's not going to be implemented. I am just not sure if I should wait or not.
marandaneto commentedon Sep 8, 2021
@Nohus we intend to work on it and it's in our backlog, but it's not prioritized yet.
adinauer commentedon Apr 28, 2022
Suggestion for implementation that would have to be discussed with Client Infra TSC as this might be something all SDKs should do. If so the SDKs should do it in a similar manner.
Add a new method to
EventProcessorthat allows people to extract attachments from an exception.public List<Attachment> extractAttachments(SentryEvent event)Default implementation could be added to return an empty list.
marandaneto commentedon May 11, 2022
@adinauer Should we move this issue to In progress and add to v6? or the hints improvements won't automatically fix this? Thanks.
adinauer commentedon Dec 28, 2022
Closing as use case is supported by #2046
Nohus commentedon Dec 28, 2022
🎉 Amazing. I just wish I knew it was possible since May. 😄
adinauer commentedon Dec 29, 2022
@Nohus sorry, forgot to update the issue after merging the PR(s). This test shows how you can add an attachment in
beforeSend:sentry-java/sentry/src/test/java/io/sentry/SentryClientTest.kt
Lines 1724 to 1728 in b3704c8