-
Notifications
You must be signed in to change notification settings - Fork 651
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
Remove resource from individual spans #1180
Comments
Continued from this comment |
Might be related to: https://github.com/open-telemetry/opentelemetry-python/issues/1177 |
What are the Doing this IMO violates the idea of a "a Resource is an immutable representation of the entity producing telemetry". The other issue is OTLP has no span-level resource, besides maybe merging into span attributes. The OTLP exporter right now groups the spans by span |
On second look I don't believe the JS SDK has this. It is just passing a reference to the provider's resource in the constructor here and it is not settable by the user. Same goes for Go after a quick look; there is no way to set resource (https://github.com/open-telemetry/opentelemetry-go/blob/master/sdk/trace/span.go). Also not seeing it in Java. |
Co-authored-by: Renovate Bot <[email protected]>
Jaeger has some inconsistent model definitions about this. Thrift span def doesn't have So, for Jaeger to work with protobuf span should have resource attribute for every span or at least pb2_span should be populated with some resource data.
This makes lot of sense and trace specification doesn't have anything related to resource. |
This issue was marked stale due to lack of activity. It will be closed in 30 days. |
Following this issue, we need the resource to be on the individual spans to populate |
Steps to reproduce
You can currently set a resource directly on a span:
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
Line 367 in 9be899e
My understanding was it should only be in the Tracer/Meter providers since resource is generally a constant throughout the program based on the environment.
What is the expected behavior?
I believe resource should only be attached to the providers.
What is the actual behavior?
Can set it on spans
Additional context
OTLP only has Resource once for all the spans sent in a request: https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L28-L31
I couldn't find resource attribute for spans in the tracing spec either.
The text was updated successfully, but these errors were encountered: