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

util/tracing: re-key activeSpans map on span ID #60666

Merged
merged 1 commit into from Feb 17, 2021

Conversation

angelapwen
Copy link

Note that the changes in this PR should be used in #60616 to more easily retrieve a span given its span ID, without having to visit all spans and check for a match on span ID. Whichever PR lands later should update the sections of code marked as #TODOs in #60616.

Previously, a tracer's activeSpans map was keyed on the memory
address of the span itself. This commit keys the map on the span ID
(which is deterministically unique) and sets the corresponding
value in the map to be the memory address of the span itself. This
allows us to continue to visit all active spans via the map, but
also easily retrieve a span from its ID using the map.

Release note: None

@angelapwen angelapwen self-assigned this Feb 17, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, a Tracer's `activeSpans` map was keyed on the memory
address of the span itself. This commit keys the map on the span ID
(which is deterministically unique) and sets the corresponding
value in the map to be the memory address of the span itself. This
allows us to continue to visit all active spans via the map, but
also easily retrieve a span from its ID using the map.

Release note: None
@angelapwen
Copy link
Author

bors r=irfansharif

Thanks for the review 🙏

@craig
Copy link
Contributor

craig bot commented Feb 17, 2021

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 17, 2021

Build succeeded:

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.

None yet

3 participants