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

opentelemetry: Backport Assign default ids if missing #1029

Merged
merged 1 commit into from
Oct 10, 2020

Conversation

jtescher
Copy link
Collaborator

Backport #1027 to v0.1.x

## Motivation

It is currently possible to create a span graph which includes a span
that has both an invalid parent otel context _and_ a missing trace id by
assigning an invalid extracted parent context to a non-root span.
Constructing this particular graph will currently cause a panic.

## Solution

Explicitly assign invalid trace / span ids when sampling using the otel
SDK if the span builder does not contain these values.
@jtescher jtescher requested a review from a team as a code owner October 10, 2020 00:17
@jtescher jtescher added the crate/opentelemetry Related to the `tracing-opentelemetry` crate. label Oct 10, 2020
Copy link
Member

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! LGTM

@jtescher jtescher merged commit 73c0c10 into v0.1.x Oct 10, 2020
@jtescher jtescher deleted the jtescher/default-trace-ids-backport branch October 10, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants