-
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-1236] Add support for OTel headers #1832
Conversation
c3a2f42
to
2f8a97d
Compare
2f8a97d
to
43dddef
Compare
Codecov Report
@@ Coverage Diff @@
## main #1832 +/- ##
==========================================
+ Coverage 93.06% 93.07% +0.01%
==========================================
Files 132 132
Lines 5103 5185 +82
Branches 1143 1173 +30
==========================================
+ Hits 4749 4826 +77
- Misses 354 359 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
427e90a
to
896b641
Compare
896b641
to
95c77f0
Compare
If we want to align this with OpenTelemetry conventions, we should name this |
Also, the OTEL convention is the name |
dc7d21d
to
a517875
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.
This PR updates rum-events-format
, but I don't think that was intended, maybe revert it
propagatorTypes.forEach((propagatorType) => { | ||
switch (propagatorType) { | ||
case 'datadog': { |
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.
👏 praise: It looks great, nice job!
a517875
to
7c2c512
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.
From an APM Tracer dev that's working on OTEL headers, this looks good to me 👍🏼
try { | ||
if (typeof item === 'function') { |
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.
💬 suggestion: if you had some error cases in mind when expanding the scope of the try/catch, it could be nice to add some tests for them
@@ -36,7 +36,7 @@ export function areCookiesAuthorized(options: CookieOptions): boolean { | |||
// the test cookie lifetime | |||
const testCookieName = `dd_cookie_test_${generateUUID()}` | |||
const testCookieValue = 'test' | |||
setCookie(testCookieName, testCookieValue, ONE_SECOND, options) | |||
setCookie(testCookieName, testCookieValue, ONE_MINUTE, options) |
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.
❓ question: I am curious why this needed changing?
great job! when will this be released? looking to use this asap cc @BenoitZugmeyer @liywjl |
Hi @naseemkullah, it should be released early January. |
Motivation
Users would like to use RUM alongside backends that are instrumented with OpenTelemetry, and benefit from the correlation of traces in APM.
Changes
Added a new RUM configuration property:
allowedTracingUrls: { match: MatchOption, propagatorTypes: ("datadog" | "tracecontext" | "b3" | "b3multi")[] }
This allows to select which propagator types to use when creating the request headers. It also gives more flexibility by providing the full URL to the match function (instead of origin).
Testing
I have gone over the contributing documentation.