Skip to content
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

feat(sentry-core): add support for w3c traceparent #687

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saiintbrisson
Copy link

This change does two things:

  1. Add a function to allow creating a TransactionContext with a custom Trace ID without a parent span ID.
    My company is testing traces on Sentry in parallel to our current trace solution, for ease of use, we'd like to keep using the same trace ID on both platforms for now. Currently, my approach is to create a sentry-trace header with a zeroed span ID, but the UI has this bright red alert telling me that the parent span ID is invalid, and this is bugging me. I doubt I'm the only one who has faced this issue before.
  2. Implements support for the traceparent as stated in Tracing: W3C Trace Context Support team-sdks#41. sentry-trace still takes precedence. It does not emit the header, though. Should it? It only allows for parsing for now.

@saiintbrisson saiintbrisson marked this pull request as draft September 27, 2024 01:48
@saiintbrisson
Copy link
Author

I need to figure some stuff out in #686 before doing this one.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.26%. Comparing base (e3b0fba) to head (4ca67ff).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #687      +/-   ##
==========================================
+ Coverage   73.25%   73.26%   +0.01%     
==========================================
  Files          66       66              
  Lines        7754     7781      +27     
==========================================
+ Hits         5680     5701      +21     
- Misses       2074     2080       +6     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants