-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
tracing: elide tags from recording if not verbose #61116
Conversation
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.
Reviewed 3 of 3 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif)
This avoids some of the obviously problematic expensive stringifications observed in cockroachdb#59379. Release justification: low-risk performance optimization that unblocks sql stats. Release note: None
`version.IsActive` unmarshals a protobuf (and this isn't trivial to fix), so let the tracer cache a positive result. This means that in the common case, IsActive is not on the hot path any more. Release justification: low-risk performance improvement Release note: None
95fc831
to
bec47d3
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.
Not very familiar with tracing yet, but an alternative might be to generate and memoize the tags on first use.
Reviewed 5 of 5 files at r3, 1 of 1 files at r4.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @irfansharif)
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @irfansharif)
bors r+
This is difficult with the way things currently work: tags are stringified ~once per Span, so memoization would have to live outside of the tracing package. But I agree that it would be workable. |
Build succeeded: |
This avoids some of the obviously problematic expensive stringifications
observed in #59379.
Release justification: low-risk performance optimization that unblocks sql stats.
Release note: None