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-opentelemetry should set the target property for spans #1397

Closed
lilymara-onesignal opened this issue May 10, 2021 · 1 comment
Closed

Comments

@lilymara-onesignal
Copy link
Contributor

Feature Request

Crates

  • tracing-opentelemetry

Motivation

When tracing-opentelemetry reports events to opentelemetry, it sets the target property to the target of the tracing::Event. This same functionality should be extended to tracing::Span data to make it more obvious where spans are coming from.

Key::new("target").string(meta.target().to_string()),

Here is a screenshot of a trace from tracing-opentelemetry viewed in Jager. Many crates have very simple span names, which can make it difficult to discern where they are coming from without the additional context of the target attribute.

Screenshot of a trace from tracing-opentelemetry in jaeger. Log data include a "target" attribute and span data do not.

Proposal

I think it should be added in the same way as the target is added to the event data, at the time we build the opentelemetry span. Possible downsides are storing extra data or making additional allocations when they could be avoided.

Alternatives

This could possibly be an opt-in behavior set by consumers of the crate when they construct the subscriber.

@lilymara-onesignal
Copy link
Contributor Author

lilymara-onesignal commented May 25, 2021

This is resolved by #1411

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

No branches or pull requests

1 participant