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

Session replays recording while app is in background #4047

Open
4 of 11 tasks
hammoudma opened this issue Aug 26, 2024 · 6 comments
Open
4 of 11 tasks

Session replays recording while app is in background #4047

hammoudma opened this issue Aug 26, 2024 · 6 comments

Comments

@hammoudma
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 8.33.0

react-native version: 0.74.0

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

Configuration:

(@sentry/react-native)

Sentry.init({
      dsn: SENTRY_DSN,
      environment: SENTRY_ENVIRONMENT,
      _experiments: {
        replaysSessionSampleRate: 0,
        replaysOnErrorSampleRate: 1.0
      },
      integrations: [
        Sentry.mobileReplayIntegration({
          maskAllText: false,
          maskAllImages: false
        })
      ]
    });

I have the following issue:

I am getting hours-long replay sessions of the app idling in the background. Is there a way to disable that?
I am assuming that that is also happening when the app is open and then the screen is locked.

Expected result:

I only get replays of user sessions were the user is using the app.

@krystofwoldrich
Copy link
Member

Hi @hammoudma,

thank you for the message,

could you describe more in detail, how to reproduce the behaviour?

I've tried to open our sample app, capture an error, lock the simulator screen and unlock it 10 minutes later, the replay shows the app was suspended for the 10 minutes.

@hammoudma
Copy link
Author

Hi @krystofwoldrich

Sorry I wasnt clear in the description, the replays I am getting are not of an error, they are just of the app idling for a long time.

Image

For example, is there a way to get rid of these or limit the recording time

@krystofwoldrich
Copy link
Member

@hammoudma Thank you for the explanation. I understand now.

@krystofwoldrich
Copy link
Member

@brustolin @romtsn Does the current Replay length limit includes the inactive/paused replay time?

@brustolin
Copy link
Contributor

Technically, yes, but this should not happen. Once it goes into the background for more than 30 seconds, we should not consider it the same session.

@krystofwoldrich
Copy link
Member

Bump cocoa when getsentry/sentry-cocoa#4303 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

3 participants