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

Sampling off session replays based off device.class for iOS/Android SDKs

Open sentryadam0000345 opened this issue 1 year ago • 5 comments

Problem Statement

Currently this is not supported based off the docs listed here.

Solution Brainstorm

Having something similiar to the transactions sampler that we have here would be ideal:

https://docs.sentry.io/platforms/javascript/configuration/sampling/#setting-a-sampling-function

Product Area

Replays

sentryadam0000345 avatar Sep 30 '24 23:09 sentryadam0000345

Auto-routing to @getsentry/product-owners-replays for triage ⏲️

getsantry[bot] avatar Sep 30 '24 23:09 getsantry[bot]

Hey @sentryadam0000345 👋

Thanks for your feature request. This work is not currently scoped as part of our general availability release but we'll log this in our backlog.

Is there a particular use-case where you'd find this useful?

jas-kas avatar Oct 01 '24 19:10 jas-kas

With potentially higher performance impacts with the new mobile session replays feature, I might want to make sure that none of my lower class devices have mobile session replay turned on or are collected (so perhaps this is more about session replay being selectively initialized for a certain class of devices).

sentryadam0000345 avatar Oct 01 '24 23:10 sentryadam0000345

Is the goal to not record a replay of the overhead can be noticeable to the user? If so, we might have something built in that turns off replay if we detect the overhead is high. But a custom sampling strategy based on device class has some limitations. The main being the fact we don't know the class in the device. That's populated server side in Sentry.

bruno-garcia avatar Oct 02 '24 16:10 bruno-garcia

Yes that's the goal and turning off replay if overhead is high sounds like it can work. Thanks

sentryadam0000345 avatar Oct 02 '24 22:10 sentryadam0000345