Skip to content

Record replay sessions for a certain group of users #53257

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

Closed
Lezhag opened this issue Jul 20, 2023 · 5 comments
Closed

Record replay sessions for a certain group of users #53257

Lezhag opened this issue Jul 20, 2023 · 5 comments

Comments

@Lezhag
Copy link

Lezhag commented Jul 20, 2023

Problem Statement

In our app we give access to test users and admin users which are heavily using the app, but don't have any product value. So these replays are just a waste of time and resources. We would like to exclude these users from session replays. I couldn't find a way of doing it.

Solution Brainstorm

No response

Product Area

Replays

@getsantry
Copy link
Contributor

getsantry bot commented Jul 20, 2023

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Jul 20, 2023

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

@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 Jul 20, 2023
@bruno-garcia
Copy link
Member

Are you sampling only on error (replaysOnErrorSampleRate) or also just sessions (replaysSessionSampleRate).
Do you currently capture errors for all sessions (admin/test users included)?

@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 Jul 20, 2023
@Lezhag
Copy link
Author

Lezhag commented Jul 23, 2023

I have both:

replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0

So yes, I am capturing all the sessions

@bruno-garcia
Copy link
Member

I have both:

replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0

So yes, I am capturing all the sessions

Thanks for sharing. That's right, you're capturing 100% of session that have 1 or more errors, and 10% of random sessions, regardless of having an error.

If you want to conditionally sample based on the user, you can set a different value depending on the user in question.

Another alternative, is to not use these sample rates, and use the start and stop functions programatically. We document how to programatically start/stop recording, here: https://docs.sentry.io/platforms/javascript/session-replay/understanding-sessions/#manually-starting-replay

We understand these are less convenient than having more options built-in to the SDK to control which sessions to sample. There's already a ticket tracking this request, please comment, 👍 and/or subscribe on that one instead:

@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants