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

Set builder parent span to None when manually setting parent #26

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

mladedav
Copy link
Contributor

Closes #25

Motivation

When I tried to find a parent span as someone not familiar with the code I tried using what's in the builder and if there's None I tried the parent context (which always has trace ID, it just might be invalid).

This change should simplify this for people unfamiliar with the codebase by getting rid of the trace ID that's not used.

Solution

Set trace ID in builder to None. It has not been used anywhere if parent_cx contained a valid trace ID so no other changes are needed.

…okio-rs#25)

Signed-off-by: David Mládek <david.mladek.cz@gmail.com>
@mladedav mladedav requested a review from jtescher as a code owner May 31, 2023 20:09
Copy link
Collaborator

@jtescher jtescher left a comment

Choose a reason for hiding this comment

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

Thanks @mladedav

@jtescher jtescher merged commit 040c57a into tokio-rs:v0.1.x Jun 1, 2023
13 checks passed
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.

OpenTelemetrySpanExt::set_parent does not update trace ID in OtelData
2 participants