-
Notifications
You must be signed in to change notification settings - Fork 46
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
[RUM-7629] New Tracing Headers APIs #793
[RUM-7629] New Tracing Headers APIs #793
Conversation
packages/core/src/rum/instrumentation/resourceTracking/helpers/FormattedUUID.ts
Outdated
Show resolved
Hide resolved
Datadog ReportBranch report: ✅ 0 Failed, 640 Passed, 1 Skipped, 11.89s Total Time |
packages/core/src/rum/instrumentation/resourceTracking/helpers/FormattedUUID.ts
Outdated
Show resolved
Hide resolved
883d5a2
to
5744256
Compare
generateUUID
method
packages/core/src/rum/__tests__/__utils__/TracingHeadersUtils.ts
Outdated
Show resolved
Hide resolved
5744256
to
ce833f6
Compare
* Removed generateUUID * Added generateTraceId() * Added generateSpanId() * Added getTracingHeaders() * Added injectTracingHeaders() * Added buildTracingHeadersInjector()
ce833f6
to
17229bf
Compare
@0xnm I have done a big refactoring and opted for a completely different approach. I have described the changes in the PR notes, let me know if you have any questions :) Thank you for your feedback and your help with this PR! |
Hey @marco-saia-datadog . Great work.
|
8436efc
to
9638b36
Compare
320b900
to
ccce42b
Compare
What does this PR do?
Introduces new APIs to retrieve the tracing context for different propagator types, and for manually generating Trace IDs and Span IDs.
Tracing Context APIs
A new method has been introduced in this PR, for exposing Tracing Headers and RUM Resource Context attributes:
(1) Example usage with custom network library (e.g SSL pinning)
(2) Example usage with custom network library (e.g SSL pinning) - using injector
(3) Example utility method with custom network library (e.g SSL pinning)
Trace IDs and Span IDs APIs
Example Usage
Additional Notes
This PR is a rework on the original #784 from @jhssilva, by providing a helper class that encapsulates the tracing identifiers and exposes different utility methods to convert it to the desired string representations, and by adding methods to directly retrieve the headers for an easy and out of the box usage.
Review checklist (to be filled by reviewers)