sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Uploading Session Replay When it should not?

Open acfriedman opened this issue 10 months ago • 4 comments

Platform

iOS

Environment

Production

Installed

Swift Package Manager

Version

8.44.0

Xcode Version

16.2

Did it work on previous versions?

No response

Steps to Reproduce

My session replay configuration is set like:

        options.sessionReplay.sessionSampleRate = 0.0
        options.sessionReplay.onErrorSampleRate = 0.5

Expected Result

Should not upload a full session replay to Sentry

Actual Result

I am seeing a full session replay uploaded to Sentry web WITHOUT an error.

Image

Are you willing to submit a PR?

No response

acfriedman avatar Feb 18 '25 19:02 acfriedman

Hi @acfriedman, thanks for reporting this issue.

Can you please provide your full Sentry configuration block (or ideally a reproducible project), so I can try to reproduce it in our sample projects?

Furthermore, are you using SentrySDK.replay.start() in your application?

philprime avatar Feb 19 '25 16:02 philprime

Hi @philprime

I spoke with "Billy" about this in Discord, and he said that this specific issue that I was seeing was a result of the error being filtered out due to rate limiting. Which makes sense to me. Our project has a very low rate limit at the moment.

However, Billy also said:

I'm also seeing other oddities with that replay that we will look into (e.g. most of that replay is "unavailable" which looks wrong)

I'd also like to suggest a feature enhancement, that is, our app has very long sessions, and its very unlikely that most of these sessions will require the full recording after an error. If we could set a max duration on the replay that would be nice. I'm not sure how much an hour+ video impacts performance, but even if its still negligible the UX doesn't seem great either way.

Furthermore, are you using SentrySDK.replay.start() in your application?

We are not

Also, I am no longer seeing this particular replay in the sentry Web view.. looks like it was potentially deleted

acfriedman avatar Feb 19 '25 16:02 acfriedman

@acfriedman hey, Billy here -- we took another look at it, and some details in the replay suggest it may not be due to rate limiting (the replayType says it's session), so we're continuing investigation.

billyvg avatar Feb 19 '25 16:02 billyvg

Sorry @acfriedman for the long delay on this issue. Can you still reproduce the issue with the latest version of the SDK?

philprime avatar Jun 13 '25 08:06 philprime

I believe this to be related to COCOA-499 / https://github.com/getsentry/sentry-cocoa/issues/5734

philprime avatar Jul 28 '25 08:07 philprime