-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Currently, we set the replay_id on the DSC whenever the replay is enabled. However, due to recent changes to error sampling, you'll basically always have an active session, unless both sample rates are 0, because we always buffer. This means that when replay is enabled, and we want to sample all transactions that have a replay_id, all transactions would always be sampled (more or less).
I would propose to only add the replay_id to the DSC when the session is in session recording mode. This should ensure that it is only set on DSC when the session is actually being sent to Sentry (when an error happens, we swap the session to session mode, so it would then also be set afterwards). However, that means that any transaction created before in buffer mode would not have the DSC set. But I don't really see a good way to prevent this (ideas welcome!).