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

Recommend to make traceflags a struct #1516

Closed
bogdandrutu opened this issue Feb 5, 2021 · 1 comment · Fixed by #1770
Closed

Recommend to make traceflags a struct #1516

bogdandrutu opened this issue Feb 5, 2021 · 1 comment · Fixed by #1770
Assignees
Labels
area:trace Part of OpenTelemetry tracing enhancement New feature or request
Milestone

Comments

@bogdandrutu
Copy link
Member

bogdandrutu commented Feb 5, 2021

Right now TraceFlags is just a bit, I think it is more extensible to have it like a struct type TraceFlags byte and expose helpers like IsSampled on this struct.

@bogdandrutu bogdandrutu added the enhancement New feature or request label Feb 5, 2021
@MrAlias
Copy link
Contributor

MrAlias commented Feb 12, 2021

The Go type system allows methods to be added to any types, not just structs, so I'm not sure that should motivate an underlying type change. That said, I think the downside of using a struct with the small increase in resource overhead might be outweighed by the potential extensibility.

What other fields do you anticipate being added to the TraceFlags type?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants