-
Notifications
You must be signed in to change notification settings - Fork 140
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-1084] ignore init if a RUM instance is or will be injected by synthetics #1170
✨ [RUMF-1084] ignore init if a RUM instance is or will be injected by synthetics #1170
Conversation
@@ -0,0 +1,30 @@ | |||
import { getCookie } from '@datadog/browser-core' |
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.
tools/syntheticsContext.ts
, should it be consider as a tool?
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.
Would you rather put it in domain
? I thought it wasn't directly related to how RUM works, but happy to move it elsewhere.
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.
Why not to have tools, but I would also think of moving other components like ContextHistory
which also looks like tools.
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.
IMO
- syntheticsContext -> domain
- contextHistory -> tools
To avoid any side effect like warning message, let's bail out earlier.
Codecov Report
@@ Coverage Diff @@
## main #1170 +/- ##
==========================================
+ Coverage 88.69% 88.71% +0.01%
==========================================
Files 97 98 +1
Lines 4264 4270 +6
Branches 962 964 +2
==========================================
+ Hits 3782 3788 +6
Misses 482 482
Continue to review full report at Codecov.
|
Motivation
Allows the Synthetics worker to prevent any RUM SDK initialisation if it plans to inject a RUM instance itself.
Changes
init()
call based on values (global variables/cookies) provided by the Synthetics workerTesting
I have gone over the contributing documentation.