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

Associating Spans with a Resource #491

Closed
mwear opened this issue Feb 26, 2020 · 2 comments
Closed

Associating Spans with a Resource #491

mwear opened this issue Feb 26, 2020 · 2 comments

Comments

@mwear
Copy link
Member

mwear commented Feb 26, 2020

There was a discussion at the spec call about confusion over resources. The topic came up when discussing Library Resources.

The specification has the following to say about resources and spans:

When used with distributed tracing, a resource can be associated with the TracerProvider. When associated with a TracerProvider, all Spans produced by any Tracer from the provider will automatically be associated with this Resource.

Some SIGs have interpreted this to mean that a TracerProvider should create a resource that is associated with a given tracer and the spans it generates. The implication is that this would happen behind the scenes since resources are part of the SDK and not the API. The Resource that the Ruby SIG is creating is a Library Resource where the library.name and library.version attributes are the name and version of the instrumentation used for a named tracer.

There seems to be conflicting information about whether or not this is correct.

There is a PR to add library information to the proto:
open-telemetry/opentelemetry-proto#94

However there is already a resource in the protos:
https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/trace/v1/trace.proto#L27-L35

What should this resource be if not the library resource associated with the named tracer that is generating the spans?

EDIT: I think this resource is meant to be the process level resource.

@Oberon00
Copy link
Member

Oberon00 commented Feb 27, 2020

Some SIGs have interpreted this to mean that a TracerProvider should create a resource that is associated with a given tracer and the spans it generates.

In my opinion the spec is clear here that there should be one single resource per TracerProvider that should be shared by all tracers.

a resource can be associated with the TracerProvider. When associated with a TracerProvider, all Spans produced by any Tracer from the provider will automatically be associated with this Resource.

(bold added by me)

About the library resource, see #484.

@mwear
Copy link
Member Author

mwear commented Feb 27, 2020

@Oberon00 thanks, that along with #484 helps clarify the role of the library resource, at least in terms of how it's currently spec'd.

Given that, and the structure of the protos, I think the resource for ResourceSpans is meant to be the process level resource.

My questions are answered, I'll go ahead and close this.

@mwear mwear closed this as completed Feb 27, 2020
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

2 participants