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

OTLP proto encoding methods are missing instrumentation scope schema url and attributes #4358

Open
dbarker opened this issue Dec 16, 2024 · 0 comments · May be fixed by #4359
Open

OTLP proto encoding methods are missing instrumentation scope schema url and attributes #4358

dbarker opened this issue Dec 16, 2024 · 0 comments · May be fixed by #4359
Labels
bug Something isn't working

Comments

@dbarker
Copy link

dbarker commented Dec 16, 2024

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

  1. Add a schema url and attributes when getting a meter, tracer, or logger.
  2. Create and record a span, metric, or log record
  3. 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

Logs encoder is not setting the ScopeLogs.schema_url

Metrics encoder is not using the _encode_instrumentation_scope method and is not setting the ScopeMetrics.schema_url

Trace encoder doesn't set the ScopeSpans.schema_url

Would you like to implement a fix?

Yes

@dbarker dbarker added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant