sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Add new captureFeedback to RN SDK

Open dalnoki opened this issue 1 year ago • 3 comments

Description

This function is the base functionality needed to allow capturing user feedback while including tags, replay_id, trace_id, etc. It's part of the 'new user feedback' product (https://github.com/getsentry/sentry/issues/64671) that was shipped for Web. That included a built-in widget, that allows screenshot attachment, and under the hood relies on this new function that deprecates the old captureUserFeedback which required an event_id. The new function optionally takes a related event_id and will contain relevant context stand alone.

Since RN is built on top of the JS SDK we might be able to re-export the function. But we need to verify that connection to tracing and replays will work properly. See:

  • https://docs.sentry.io/platforms/javascript/user-feedback/#user-feedback-api

This means a new envelope format for feedback was introduced. The new Feedback product architecture has thoroughly documented by @aliu39 here:

  • https://develop.sentry.dev/application/feedback-architecture/

This new function will allow outgoing feedbacks to be tied to Session Replay, which is currently Open Beta and we're working on GA:

  • https://github.com/getsentry/sentry/issues/74441

The develop docs have not been added yet, but the ticket with details about it is here:

  • https://github.com/getsentry/develop/issues/1206

Relates to:

  • https://github.com/getsentry/sentry-java/issues/3599
  • https://github.com/getsentry/sentry-cocoa/issues/4187
  • https://github.com/getsentry/sentry-go/issues/842
  • https://github.com/getsentry/sentry-dart/issues/1593
  • https://github.com/getsentry/sentry-javascript/issues/10953

dalnoki avatar Jun 05 '24 07:06 dalnoki

See also:

  • https://github.com/sentry-demos/sentry_react_native/pull/72

bruno-garcia avatar Jul 24 '24 01:07 bruno-garcia

The API without UI, will be available in RN SDK v6 (the next major) which includes JS v8 which includeds the new captureFeedback API.

krystofwoldrich avatar Aug 01 '24 12:08 krystofwoldrich

  • Depends on https://github.com/getsentry/sentry-java/pull/3687

krystofwoldrich avatar Sep 13 '24 12:09 krystofwoldrich