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 record too long #2583

Closed
kimwest00 opened this issue Jan 20, 2025 · 4 comments
Closed

Session replays record too long #2583

kimwest00 opened this issue Jan 20, 2025 · 4 comments

Comments

@kimwest00
Copy link

kimwest00 commented Jan 20, 2025

Platform

Flutter Mobile iOS, Flutter Mobile Android

Obfuscation

Disabled

Debug Info

Disabled

Doctor

flutter doctor -v
[!] Flutter (Channel [user-branch], 3.24.5, on macOS 15.2 24C101 darwin-arm64, locale ko-KR)
    ! Flutter version 3.24.5 on channel [user-branch] at (private root)
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision dec2ee5c1f (10주 전), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at (private root)
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Community Edition (version 2024.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 82.1.3
    • Dart plugin version 242.21829.3

[✓] VS Code (version 1.96.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (6 available)
    • iPhone 16 Pro (mobile)          • 96482B12-5EA2-4540-B68F-2F9071C26F15 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
    • iPhone 16 (mobile)              • F1295368-0DF5-4CF7-9D89-B2F6861A5CF4 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 132.0.6834.83

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Version

^8.11.0

Steps to Reproduce

just basic setting follow docs

I just add below code for activating replay function when Sentry.init

experimental.replay.onErrorSampleRate = 0.1
experimental.privacy.maskAllText = false
experimental.privacy.maskAllImages = false;

I found similar issue on javascript sdk(getsentry/sentry-javascript#13778)

Expected Result

Record within 60 minutes
This is stated in the document

Actual Result

Replay recorded too long sometimes
This affect so much on our team's price limit because of too lots of attachments;)
We need quick resolve on this
Image

Are you willing to submit a PR?

None

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 20, 2025
@kimwest00 kimwest00 changed the title record too long (tens of hours) Session replays Session replays record too long Jan 20, 2025
@vaind vaind self-assigned this Jan 20, 2025
@vaind
Copy link
Collaborator

vaind commented Jan 20, 2025

I've tried reproducing this locally by running an app on an Android device. I've had a script that periodically scrolls the app so that it doesn't go into background. After 1 hour, the replay stopped, as expected, with I/Sentry (20135): Session replay deadline exceeded (1h), stopping recording

Can you check your replays to verify they're actually being recorded for more than 60 minutes? What could happen is that the app is in the background (and not recording) but if an error occurs while in the background, it will be linked to the replay and advance the timestamp. For example, the following replay shows a native example app that was in the background for 3 hours and then there was an error. The light-gray bar (which in this case actually fills the whole progress bar visually, because the real recording only has 10 seconds), shows that the video is unavailable:

Image

@kimwest00
Copy link
Author

I check this again and in my case, found that the "Video unavailable" label point was recorded at a timestamp of over 20 hours
Did you explain that when the "Video Unavailable" state occurs and no recording is made, it also impacts the size of individual replays smaller?
Image
Image

Since implementing the Session Replay feature, cases of exceeding attachment limits have become frequent.
So I suspect that the Session Replay feature unintentionally generates excessively large attachments, which impacts billing.

However, the size of individual sessions is not explicitly listed (e.g., the size shown in the issue's attachments menu), making it difficult to confirm whether this assumption is accurate.

In summary, I want to confirm whether Session Replay recordings exceeding one hour significantly contribute to the increase in attachment size.

@vaind
Copy link
Collaborator

vaind commented Jan 22, 2025

Replays are not attachments and are priced separately and the length of a replay doesn't impact how they're billed. You can head over to https://sentry.io/settings/billing/overview/ to see how your quote is used.

@vaind
Copy link
Collaborator

vaind commented Feb 13, 2025

I believe the questions in this issue have been answered. Feel free to open a new issue if there's something else to clarify.

@vaind vaind closed this as completed Feb 13, 2025
@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants