Fix the Okhttp Otel parent span feature when not using RUM#2100
Merged
mariusc83 merged 1 commit intoJun 21, 2024
Conversation
0xnm
reviewed
Jun 21, 2024
| fun Request.Builder.addParentSpan(span: Span): Request.Builder { | ||
| val context = span.spanContext | ||
| val prioritySampling = if (context.isSampled) PrioritySampling.USER_KEEP.toInt() else PrioritySampling.UNSET.toInt() | ||
| // because the DatadogTracer is using the old legacy DDTracer for handling the spans around request |
Member
There was a problem hiding this comment.
what is the DatadogTracer? I cannot find such symbol in the code
Member
Author
There was a problem hiding this comment.
yes because it should be DatadogInterceptor there ;)
mariusc83
force-pushed
the
mconstantin/fix-otel-okhttp-parent-span-extension
branch
from
June 21, 2024 08:54
097c3df to
f41f886
Compare
0xnm
approved these changes
Jun 21, 2024
| val prioritySampling = if (context.isSampled) PrioritySampling.USER_KEEP.toInt() else PrioritySampling.UNSET.toInt() | ||
| // because the DatadogInterceptor is using the old legacy DDTracer for handling the spans around request | ||
| // we need to provide the legacy sampling codes here. | ||
| val prioritySampling = if (context.isSampled) PrioritySampling.USER_KEEP else PrioritySampling.UNSET |
Member
There was a problem hiding this comment.
so the difference is only in the UNSET value? 0x80 vs Integer.MIN_VALUE. Do we have a possibility of such mismatch in other parts of the code?
Member
Author
There was a problem hiding this comment.
yes that was the problem, we do not have any other places this is just because we are using Otel here and on the other side we are using OpenTracing. We really need to get rid of that ASAP and switch everything to CoreTracer
xgouchet
approved these changes
Jun 21, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)