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

tracing: elide tags from recording if not verbose #61116

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

tbg
Copy link
Member

@tbg tbg commented Feb 25, 2021

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

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r2.
Reviewable status: :shipit: 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
Copy link
Contributor

@erikgrinaker erikgrinaker left a 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: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @irfansharif)

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @irfansharif)

@tbg
Copy link
Member Author

tbg commented Feb 26, 2021

bors r+

Not very familiar with tracing yet, but an alternative might be to generate and memoize the tags on first use.

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.

@craig
Copy link
Contributor

craig bot commented Feb 26, 2021

Build succeeded:

@craig craig bot merged commit dac79a2 into cockroachdb:master Feb 26, 2021
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

Successfully merging this pull request may close these issues.

5 participants