-
Notifications
You must be signed in to change notification settings - Fork 377
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
[distributed_headers] Accept signed integers as IDs. #530
[distributed_headers] Accept signed integers as IDs. #530
Conversation
This is what dd-trace-js sends over the wire: https://github.com/DataDog/dd-trace-js/blob/aa607860ea6bb57f2f69fa7ee72ed3ce25abfbf6/src/opentracing/propagation/text_map.js#L14-L15 It’s also what has been patched in e.g. dd-trace-go: DataDog/dd-trace-go#326
|
||
def id(header) | ||
value = header(header).to_i | ||
return if value == 0 || value >= Span::MAX_ID |
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.
I assumed that 0
is truly invalid as an ID, but definitely don’t know for sure.
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.
Btw, is there a trace specification available?
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.
At this moment documentation is not available. But since this issue surfaced its something on our radar.
Thanks for the contribution! Looks good overall, however I'm worried if the process of converting to unsigned is compatible with how Go is performing it. Would it be possible to add another test for the same number as Go implementation tests - https://github.com/DataDog/dd-trace-go/pull/326/files#diff-58eb3484bc934d38b7496e8a7363200fR47 ? BTW The tests are not passing because of CircleCI security where Caches cannot be persisted by forks - our CI is not working properly for some PRs. We have PR in progress to fix that #526 |
198704f
to
142192f
Compare
Sure thing 👍 Updated with the test from the Go PR. |
142192f
to
49b882d
Compare
@alloy There's a CI failure related to a Rubocop violation; if we can fix that and see the tests pass, I think we can merge this for 0.15.0. |
@delner Done. Thanks for the poke 👍 |
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.
Looks good, thanks for your contribution @alloy !
This is what dd-trace-js sends over the wire:
https://github.com/DataDog/dd-trace-js/blob/aa607860ea6bb57f2f69fa7ee72ed3ce25abfbf6/src/opentracing/propagation/text_map.js#L14-L15
It’s also what has been patched in e.g. dd-trace-go:
DataDog/dd-trace-go#326