You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version: Python 3.9.21
SDK version: 1.30.0.dev
API version: 1.30.0.dev
What happened?
Spans, metrics, and logs with instrumentation scope attributes and a schema url set are missing this data when exporting to otlp proto messages. Encoding the instrumentation scope schema url and attributes are missing from opentelemetry-exporter-otlp-proto-common
Steps to Reproduce
Add a schema url and attributes when getting a meter, tracer, or logger.
Create and record a span, metric, or log record
Export to an otel-collector with the otlp grpc receiver and debug exporter configured
Expected Result
The instrumentation scope schema url and attributes should show up in the otel-collector debug output
Actual Result
The instrumentation scope schema url and attributes are missing
Additional context
The _encode_instrumentation_scope method is not encoding the attributes
Our goal is narrowly defined to solve the following problem only: to allow OpenTelemetry Semantic Conventions to evolve over time.
Scope level schema URLs have been in this sdk for a while and this issue just addresses not encoding the urls (and attributes - which my project needs) to OTLP protobuf messages on export. They are still optional but encoding them is a requirement of the spec. #4359 just assigns the scope schema url and attributes to the protobuf object on export. The performance impact will be negligible considering these are still optional, default to None, and encoding to otlp is an export time operation (typically called every ~30-60s if using a batch processor).
Describe your environment
Python version: Python 3.9.21
SDK version: 1.30.0.dev
API version: 1.30.0.dev
What happened?
Spans, metrics, and logs with instrumentation scope attributes and a schema url set are missing this data when exporting to otlp proto messages. Encoding the instrumentation scope schema url and attributes are missing from opentelemetry-exporter-otlp-proto-common
Steps to Reproduce
Expected Result
The instrumentation scope schema url and attributes should show up in the otel-collector debug output
Actual Result
The instrumentation scope schema url and attributes are missing
Additional context
The
_encode_instrumentation_scope
method is not encoding the attributesLogs encoder is not setting the
ScopeLogs.schema_url
Metrics encoder is not using the
_encode_instrumentation_scope
method and is not setting theScopeMetrics.schema_url
Trace encoder doesn't set the
ScopeSpans.schema_url
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: