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

Record network request/response bodies in Session Replay

Open duspada opened this issue 1 year ago • 6 comments

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [x] Android

SDK:

  • [x] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 5.33.0

react-native version: 0.71.12

Are you using Expo?

  • [ ] Yes
  • [x] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

Click here

Configuration:

(@sentry/react-native)

  const integrations = [
        Sentry.mobileReplayIntegration({
          maskAllImages: false,
          maskAllText: false,
          maskAllVectors: false,
        }),
      ];
  const _experiments = {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      };
  Sentry.init({
    dsn: SENTRY_DSN,
    _experiments,
    integrations,
    environment: 'production',
    beforeSend: (event) => {
      return event;
    },
  });


I have the following issue: It doesn't record network payloads, response and others like headers etc...

Steps to reproduce:

  • use axios for requests
  • activate sentry session replay
  • make some request and see the log on the website

Actual result:

  • it shows the screen recording, and the network requests
  • but it doesn't show the request and response payloads

Expected result:

  • it shows the screen recording, and the network requests
  • when i click on one request, see the request, response and headers payload

duspada avatar Sep 19 '24 18:09 duspada

Looks like web have it, I don't get why RN doesn't => https://github.com/getsentry/sentry-javascript/issues/7103

jackstudd avatar Sep 25 '24 13:09 jackstudd

Thank you for the message @jackstudd.

This is correct, currently the RN Replay Implementation does not record the request and response body.

I'll mark this as a feature requests and we will post updates here.

krystofwoldrich avatar Oct 02 '24 10:10 krystofwoldrich

Just curious how the Sentry team prioritizes GH issues -- Is this on y'alls radar as a to-do item, or waiting for more thumbs ups/community feedback?

shmkane avatar Feb 18 '25 13:02 shmkane

@shmkane we try to do what makes sense, which I know is not a helpful answer :) SR has been moved out of beta recently, so we're focusing on stability and performance now. we definitely keep close watch and see when feature requests such as this one gets upvotes, so please continue using these 👍 buttons

kahest avatar Feb 20 '25 09:02 kahest

@krystofwoldrich any update on when we can expect this? Inspecting network request/response bodies is pretty vital for debugging issues in production 🤞🏽

george-g-y-b avatar Aug 13 '25 13:08 george-g-y-b

@george-g-y-b thanks for your interest - we are currently focusing on other improvements to SR, but given the interest in this feature, we prioritize it among the first new functionalities we're going to add. Please follow the updates in this GH issue.

kahest avatar Aug 18 '25 15:08 kahest