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

Update OTLP SpanData transform #614

Merged
merged 5 commits into from
Apr 7, 2020

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Apr 3, 2020

The ParentSpanId needs to be empty for root spans according to the OTLP docs. This updates the SpanData transform function to not add the ParentSpanID if it is not a valid span ID (which includes if it is the nil span ID used for an unset ID).

Additionally, this adds a test to prevent regression.

The ParentSpanId needs to be empty for root spans according to the OTLP
[docs](https://github.com/open-telemetry/opentelemetry-proto/blob/6c2a86ed2f74ca46f979f22c77f0aad449fb9629/gen/go/trace/v1/trace.pb.go#L284-L286).
This updates the SpanData transform function to not add the ParentSpanID
if it is not a valid span ID (which includes if it is the nil span ID
used for an unset ID).

Additionally, this adds a test to prevent regression.
@MrAlias
Copy link
Contributor Author

MrAlias commented Apr 7, 2020

Not sure why that test failed. It doesn't look related to this PR AFAIK. Going to close and reopen to kick off another build.

@MrAlias MrAlias closed this Apr 7, 2020
@MrAlias MrAlias reopened this Apr 7, 2020
@rghetia rghetia merged commit 856aad9 into open-telemetry:master Apr 7, 2020
@MrAlias MrAlias deleted the oltp-root-span branch April 7, 2020 22:22
@pellared pellared added this to the untracked milestone Nov 8, 2024
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