-
Notifications
You must be signed in to change notification settings - Fork 142
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
✨ [RUMF-940] implement the replay sample rate option and remove resource sample rate option #931
✨ [RUMF-940] implement the replay sample rate option and remove resource sample rate option #931
Conversation
As discussed, the "replaySampleRate" option will replace the "resourceSampleRate" option since it will re-use the same value in the session cookie. As a first step to introduce the "replaySampleRate" option, let's remove internal code related to resource sample rate. This commit intentionally keeps the "resourceSampleRate" configuration option. It will be replaced by the "replaySampleRate" in the next commit.
This option simply replaces the previous "resourceSampleRate".
b14f0bd
to
eb14cc9
Compare
Codecov Report
@@ Coverage Diff @@
## prerelease-v3 #931 +/- ##
=================================================
+ Coverage 89.01% 89.05% +0.04%
=================================================
Files 82 83 +1
Lines 3860 3884 +24
Branches 863 865 +2
=================================================
+ Hits 3436 3459 +23
- Misses 424 425 +1
Continue to review full report at Codecov.
|
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.
Good job!
// Note: the "tracking type" value (stored in the session cookie) does not match the "session | ||
// plan" value (sent in RUM events). This is expected, and was done to keep retrocompatibility | ||
// with active sessions when upgrading the SDK. | ||
TRACKED_REPLAY = '1', | ||
TRACKED_LITE = '2', |
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.
As TRACKED_WITHOUT_RESOURCES
is not strictly equivalent to TRACKED_LITE
, we could also consider to perform a new draw or consider the active session as not tracked anymore.
It sounds fine to me but it worth mentioning this behavior to @hdelaby.
c6f71cf
to
7267cf0
Compare
Co-authored-by: Bastien Caudan <[email protected]>
…rce sample rate option (#931) * 🔥 [RUMF-940] remove session.isTrackedWithResource support As discussed, the "replaySampleRate" option will replace the "resourceSampleRate" option since it will re-use the same value in the session cookie. As a first step to introduce the "replaySampleRate" option, let's remove internal code related to resource sample rate. This commit intentionally keeps the "resourceSampleRate" configuration option. It will be replaced by the "replaySampleRate" in the next commit. * 🚚 [RUMF-940] add the `replaySampleRate` option to the configuration This option simply replaces the previous "resourceSampleRate". * 🚚 [RUMF-940] adjust the "Tracking Type" namings to match the "Session Plan" * ✨ [RUMF-940] collect long tasks only with replay plans * ♻️ [RUMF-940] use SetupBuilder in rumRecorderPublicApi * ✨ [RUMF-940] don't start session replay recording for non-replay plans * remove unneeded TODO comment * 👌📝 add a bit of documentation on RecorderStatus * ✅ add mocking utility for Rum sessions * 👌 replace getPlan with hasReplayPlan/hasLitePlan * remove double slash in module path Co-authored-by: Bastien Caudan <[email protected]> Co-authored-by: Bastien Caudan <[email protected]>
…rce sample rate option (#931) * 🔥 [RUMF-940] remove session.isTrackedWithResource support As discussed, the "replaySampleRate" option will replace the "resourceSampleRate" option since it will re-use the same value in the session cookie. As a first step to introduce the "replaySampleRate" option, let's remove internal code related to resource sample rate. This commit intentionally keeps the "resourceSampleRate" configuration option. It will be replaced by the "replaySampleRate" in the next commit. * 🚚 [RUMF-940] add the `replaySampleRate` option to the configuration This option simply replaces the previous "resourceSampleRate". * 🚚 [RUMF-940] adjust the "Tracking Type" namings to match the "Session Plan" * ✨ [RUMF-940] collect long tasks only with replay plans * ♻️ [RUMF-940] use SetupBuilder in rumRecorderPublicApi * ✨ [RUMF-940] don't start session replay recording for non-replay plans * remove unneeded TODO comment * 👌📝 add a bit of documentation on RecorderStatus * ✅ add mocking utility for Rum sessions * 👌 replace getPlan with hasReplayPlan/hasLitePlan * remove double slash in module path Co-authored-by: Bastien Caudan <[email protected]> Co-authored-by: Bastien Caudan <[email protected]>
Motivation
Let the customer chose which session plan to use.
Changes
We chose to use the same value as the deprecated "session without resource" to represent "sessions with lite plans" in session cookies. Because of this, replacing the deprecated
resourceSampleRate
option with the newreplaySampleRate
option in a single PR made more sense than doing it in separate PRs.resourceSampleRate
option withreplaySampleRate
Testing
Unit, manual
I have gone over the contributing documentation.