-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/skywalking] Fix skywalking traceid and spanid convertion. #11562
[receiver/skywalking] Fix skywalking traceid and spanid convertion. #11562
Conversation
a8e349b
to
e278956
Compare
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.
Pinging code owner @JaredTan95, please review
@JaredTan95 |
8c977bc
to
539c06f
Compare
|
hi, @taloric Thanks for the fix, I don't see that your screenshot involves using the |
@JaredTan95 Thanks for the review. I did find some bugs during test with
|
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.
good catches, LGTM
@taloric BTW, can you change the issue title to [receiver/skywalking] Fix skywalking traceid and spanid convertion.
?
@codeboten PTAL on behalf of approvers. |
254e47d
to
b561fad
Compare
@codeboten @JaredTan95 @sharang |
b561fad
to
393b4c2
Compare
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.
LGTM
thx for your contributions
@Aneurysm9 PTAL on behalf of approvers. |
d78320f
to
303e699
Compare
Skywalking Agent will write skywalking trace info in logs like this: @Aneurysm9 @codeboten @JaredTan95 please review. |
This is another bug or caused by your pr? |
It's not caused by this PR. And It's aim to solve the same issue. I think what our expectation is: This PR aim to solve So I add skywalking original |
got it. make sense, LGTM |
@codeboten @Aneurysm9 @bogdandrutu would you please take a look at this PR? |
Description:
Backgrounds:
segments
to cover spans as a group. AlsoSegmentId
+SpanId
to identify an unique span inTraceData
.segmentId
and share the sametraceId
.Code Changes:
Skywalking-TraceId
toOpentelemetry-TraceId
. (The old rules breaks relations between segments because it use pointer of strings to generate a newtraceId
.)de5980b8-fce3-4a37-aab9-b4ac3af7eedd
(RFC4122) or56a5e1c519ae4c76a2b8b11d92cead7f.1.16563474296430001
.SegmentId
in the convertion ofSpanId
to make sure theSpanId
is globally unique.SegmentId
format be like:4f2f27748b8e44ecaf18fe0347194e86.33.16560607369950066
.SegmentId
(4f2f27748b8e44ecaf18fe0347194e86
) will repeat multiple times in aTraceData
, so the last part is the real unique identifier of segments.Testing:
Test_stringToTraceID()
: Make sure Skywalking-TraceId convert to the Otel-TraceId by a rule.Test_segmentIdToSpanId()
: Using Skywalking segmentId & spanId to generate a new Otel-SpanId.Documentation:
No changes.