This repository was archived by the owner on Aug 17, 2020. It is now read-only.
Trace context support in propagation Inject/Extract#105
Draft
tonyredondo wants to merge 12 commits into
Draft
Conversation
Member
|
@tonyredondo is this ready to be reviewed? |
Contributor
Author
|
No, this is on hold based in the conversation today of random in 64 bits |
fermayo
removed their request for review
January 14, 2020 08:00
tonyredondo
force-pushed
the
trace-context
branch
from
March 9, 2020 11:44
87e1ecb to
4b85f97
Compare
tonyredondo
force-pushed
the
trace-context
branch
from
March 11, 2020 17:13
3d92df5 to
a4c0ece
Compare
Comment on lines
66
to
68
| for k, v := range sc.Baggage { | ||
| carrier.Set(prefixBaggage+k, v) | ||
| } |
Contributor
There was a problem hiding this comment.
I cannot locate the tracestate header for the baggage in OTel format.
| return opentracing.ErrSpanContextCorrupted | ||
| } | ||
| traceParentArray := strings.Split(v, "-") | ||
| if len(traceParentArray) < 4 || traceParentArray[0] != "00" || len(traceParentArray[1]) != 32 || len(traceParentArray[2]) != 16 { |
Contributor
There was a problem hiding this comment.
Suggested change
| if len(traceParentArray) < 4 || traceParentArray[0] != "00" || len(traceParentArray[1]) != 32 || len(traceParentArray[2]) != 16 { | |
| if len(traceParentArray) != 4 || traceParentArray[0] != "00" || len(traceParentArray[1]) != 32 || len(traceParentArray[2]) != 16 { |
| return opentracing.ErrSpanContextCorrupted | ||
| } | ||
|
|
||
| traceID, err = uuid.Parse(traceParentArray[1]) |
Contributor
There was a problem hiding this comment.
In the Inject method, it is being removed the - characters, and here it is being parse without them. Canuuid.Parse function parse UUIDs without -?
| switch strings.ToLower(k) { | ||
| case fieldNameTraceID: | ||
| traceID, err = strconv.ParseUint(v, 16, 64) | ||
| traceID, err = uuid.Parse(v) |
Contributor
There was a problem hiding this comment.
This change implies all agents need to send UUID, isn't?
| @@ -122,7 +175,9 @@ func (p *binaryPropagator) Inject( | |||
| } | |||
|
|
|||
| state := wire.TracerState{} | |||
Contributor
There was a problem hiding this comment.
Just curiosity, are we using the binary protocol? Is there any standard for that?
tonyredondo
force-pushed
the
trace-context
branch
4 times, most recently
from
March 18, 2020 16:47
8c172d4 to
d624e51
Compare
tonyredondo
force-pushed
the
trace-context
branch
from
April 7, 2020 09:18
357af70 to
8ec9666
Compare
tonyredondo
marked this pull request as draft
June 10, 2020 10:52
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Trace context support in propagation Inject/Extract
Currently injects both
ot-andtraceparentheaders for compatibility withOTelreceptors.Try to extract both
ot-andtraceparentheadersTraceID changed from UInt64 to UUID
Implementation based on: https://www.w3.org/TR/trace-context-1/