-
Notifications
You must be signed in to change notification settings - Fork 812
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
Use OpenTelemetry API #51
Conversation
I discussed with @tylerbenson, I'm going to break this PR up into smaller commits (still one PR). Unfortunately, I'm not sure if it can be broken into smaller commits that are individually compilable/testable, but at least this will make the PR easier to review (and we squash down to a single commit during merge anyways). |
Now broken up into smaller tests. Muzzle build is failing due to recently released couchbase java-client 3.0.0 (not due to changes in this PR). |
@trask you can pull this over if you like: DataDog/dd-trace-java#1170 |
for (final String key : getter.keys(carrier)) { | ||
// extracted header value | ||
String s = getter.get(carrier, key); | ||
// in case of multiple values in the header, need to parse |
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.
Do you know if OpenTelemetry handles this edge case already?
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 don't think so, but I'm not sure that it should? (e.g. Tracestate header value is comma-separated key-value pairs)
if (span == null) { | ||
return; | ||
} | ||
span = span.getLocalRootSpan(); |
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 is going to cause some weirdness... I couldn't think of a better solution though. Ideas?
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 couldn't think of anything better either. I just added this to #50 so we can come back to it later.
🎉🎉🎉
Some instrumentation was commented out in this PR, to be brought back later (tracking in #50).
Closes #43