Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Attachment support #1327

Closed
bruno-garcia opened this issue Feb 2, 2021 · 12 comments
Closed

Add Attachment support #1327

bruno-garcia opened this issue Feb 2, 2021 · 12 comments

Comments

@bruno-garcia
Copy link
Member

The native SDKs (sentry-android, sentry-cocoa) added support to Attachments.

The spec is in the develop docs.

Thumbs up if this is the feature you've been waiting for.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto marandaneto added this to To Do in kanban via automation Nov 10, 2021
@renchap
Copy link

renchap commented Dec 20, 2021

In addition to this, it would be awesome to be able to run a callback when an error happen and generate attachments from this callback.

I have multiple states in the app (Redux, async storage…) and I would like to dump them in attachments when an issue occurs in the app to be able to understand the error if it comes from a bad state.
Currently I could add them to the event, but it can quickly go over the 200kb limit.

@marandaneto
Copy link
Contributor

This is blocked by getsentry/sentry-javascript#4240

The RN SDK uses the JS SDK for building an event and the current version does not support the Envelope feature which is required for sending attachments.

To make it work we'd need to override many of the JS behavior and later replace them once the Envelope feature is landed on the linked PR natively on the JS SDK.

The best is to postpone and implement once #4240 is done, also considering attaching attachments to hard crashes on the Native layer.

Points to consider:

  • Use the envelope feature from #4240
  • Attach attachments on hard crashes, that requires changes on Sentry-Android, Sentry-Native, and Sentry-Cocoa since we don't sync down the attachments to the Native layers (e.g. KSCrash and Sentry-Native)
  • We could technically support an array of bytes and file paths since RN does not support files natively, people most of the time use 3rd party plugins to do so.

@mmerickel
Copy link

We got hit by lack of support for this feature and the addGlobalEventProcessor approach that's documented for the javascript SDK was not working for us. We'd see 201 Accepted requests for the attachment on the server but they did not get attached to the event. Ultimately we ended up writing a bridge module and using the sentry-cocoa and sentry-android native APIs to send events with attachments for the limited case where we needed an attachment. Would really love support for attachments to get added to sentry-react-native using the scope.addAttachment features available in the native sdks.

@Noitidart
Copy link

Same @mmerickel I would see 201 but no attachment on Sentry. We left it for now, that was awesome you did the bridge.

@hdsenevi
Copy link

hdsenevi commented May 3, 2022

We got hit by lack of support for this feature and the addGlobalEventProcessor approach that's documented for the javascript SDK was not working for us. We'd see 201 Accepted requests for the attachment on the server but they did not get attached to the event. Ultimately we ended up writing a bridge module and using the sentry-cocoa and sentry-android native APIs to send events with attachments for the limited case where we needed an attachment. Would really love support for attachments to get added to sentry-react-native using the scope.addAttachment features available in the native sdks.

mmerickel Would you consider making the source for this bridge module publicly available? I'm trying to do the same and hit some roadblocks with regards to bridging functionality.

@renchap
Copy link

renchap commented Jun 11, 2022

#4240 is done, and sentry-react-native 4.0.0 uses it 👀

@renchap
Copy link

renchap commented Jun 22, 2022

And 4.0.0 is released, maybe you can remove the "blocked" tag? ;)

@Noitidart
Copy link

@renchap is attachment support in 4.0.0? or 4.0.0 just makes attachment support possible?

@renchap
Copy link

renchap commented Jun 22, 2022

It should make it possible, but not implemented yet.

@bruno-garcia
Copy link
Member Author

JS 7.0 unblocked this and it's a p1 for us. Btw we're hiring a RN engineer if anyone wants to get paid to work on open source full time: https://sentry.io/careers/3642918/

@marandaneto
Copy link
Contributor

#2463

kanban automation moved this from To Do to Done Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: GA 🚀
Development

No branches or pull requests

8 participants