Skip to content
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

why marshal TraceID not use tag,specification use TraceId #2508

Closed
1157987916 opened this issue Jan 13, 2022 · 4 comments
Closed

why marshal TraceID not use tag,specification use TraceId #2508

1157987916 opened this issue Jan 13, 2022 · 4 comments

Comments

@1157987916
Copy link

1157987916 commented Jan 13, 2022

type SpanContextConfig struct {
TraceID TraceID
SpanID SpanID
TraceFlags TraceFlags
TraceState TraceState
Remote bool
}

specification

@1157987916
Copy link
Author

image

@1157987916
Copy link
Author

企业微信截图_16420570994129

Log data model will use TraceId,it should be the same

@dmathieu
Copy link
Member

Do you mean why use TraceID instead of TraceId? If that's the case, using ID instead of Id is a Go idiom.
The specification is a means for all libraries to behave in a similar way. But each of them should also respect the idioms of their language, not blindly follow the spec.

@Aneurysm9
Copy link
Member

@dmathieu is correct regarding the capitalization difference. If your question is also about why SpanContextConfig does not have struct tags that would cause it to be marshaled using TraceId, that struct is not intended for communication, only for use with the SDK. The propagation package should be used to propagate trace context information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants