-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Move sample rate tags into event context #6659
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
Conversation
size-limit report 📦
|
c6a48f2
to
cc14603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if there's a specific reason to set the sample rates as "top-level" fields rather than e.g. storing them in event.contexts.replay
for example? Does it have something to do with contexts being hard to query for data analysis?
Just asking because usually we put stuff into contexts when collecting user options or additional information that's relevant for us to gather insights rather than relevant for the actual event.
Not saying this has to be changed, just curious ;)
Ah didn't realize that. Storing in context makes more sense then. What's the best way to set context while we are preparing the event? |
I think we have two options:
preparedEvent.contexts = {
...preparedEvent.contexts,
replay: {
...(preparedEvent.contexts && preparedEvent.contexts.replay),
replaysOnErrorSampleRate: options.replaysOnErrorSampleRate
replaysSessionSampleRate: options.replaysSessionSampleRate
}
} wdyt? |
I like the second option for now so that we're not attaching replay context to other events. |
Similar to #6658 but waiting on getsentry/replay-backend#226
3103672
to
7d9b23e
Compare
12b6379
to
af12c6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Move sample rate from tags into context as that is the more appropriate location for this type of data. This data is more for us to collect to debug rather than having as a top level field on the replay event.