-
Notifications
You must be signed in to change notification settings - Fork 118
fix(eap): Substitute nil trace ID #6079
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8b89e01
fix(eap): Substitute nil trace ID
jjbayer c730fcb
test
jjbayer ce39cef
metric
jjbayer 33584e2
tests
jjbayer 3db42c5
tag
jjbayer e0a8b96
fix
jjbayer 9766ef6
changelog
jjbayer 3f94dd5
Merge branch 'master' into fix/substitute-nil-trace-id
jjbayer 10018e0
whoops
jjbayer 4b98c24
Don't mention the UUID
jjbayer 8fe3905
use new variant name
jjbayer ddfa747
checkout conventions
jjbayer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "trace_id": "00000000-0000-0000-0000-000000000000", | ||
| "trace_id": "00000000-0000-0000-0000-000000000001", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests with nil IDs would now fail. |
||
| "public_key": "abd0f232775f45feab79864e580d160b", | ||
| "release": "1.0", | ||
| "environment": "dev", | ||
|
|
@@ -8,4 +8,4 @@ | |
| "user_id": "some-id", | ||
| "user_segment": "all", | ||
| "user": null | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -194,8 +194,9 @@ fn otel_to_sentry_link(otel_link: OtelLink) -> Result<SpanV2Link, Error> { | |
| Some((kv.key, Annotated::new(attr_value))) | ||
| })); | ||
|
|
||
| let trace_id = TraceId::try_from_or_random(otel_link.trace_id.as_slice()); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
sentry[bot] marked this conversation as resolved.
|
||
| let span_link = SpanV2Link { | ||
| trace_id: Annotated::new(hex::encode(otel_link.trace_id).parse()?), | ||
| trace_id, | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| span_id: SpanId::try_from(otel_link.span_id.as_slice())?.into(), | ||
| sampled: (otel_link.flags & W3C_TRACE_CONTEXT_SAMPLED != 0).into(), | ||
| attributes: Annotated::new(attributes), | ||
|
jjbayer marked this conversation as resolved.
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: Maybe no need to leak that there is an underlying uuid id as there are defined rules for trace ids which don't necessarily match a uuid. Could just call it
Invalid.