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 exporter: encode instrumentation scope schema url and attributes to otlp proto #4359

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

dbarker
Copy link

@dbarker dbarker commented Dec 16, 2024

Description

Fixes #4358

This PR updates the OTLP encoding methods to encode the Instrumentation Scope schema url and attributes to the proto messages for logs, metrics and traces.

Without this change the schema url and attributes set on the GetMeter, GetTracer, and GetLogger methods from providers are not exported in OTLP protobuf messages.

Unit tests have been updated to check these fields are populated with the fix.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This PR adds new cases to the logs, metrics, and trace encoding tests in opentelemetry-exporter-otlp-proto-common to cover the instrumentation scope schema url and attributes.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…messages. update tests to cover the schema_url and attributes.
@dbarker dbarker requested a review from a team as a code owner December 16, 2024 06:25
@dbarker
Copy link
Author

dbarker commented Dec 18, 2024

Ready for review. Thanks in advance for the feedback!

CHANGELOG.md Outdated Show resolved Hide resolved
@xrmx
Copy link
Contributor

xrmx commented Dec 24, 2024

@dbarker fyi no need to update this at every commit, we usually merge main before merging or during reviews 😅

@dbarker
Copy link
Author

dbarker commented Dec 24, 2024

@dbarker fyi no need to update this at every commit, we usually merge main before merging or during reviews 😅

haha.. thanks for the heads up and review. Just making sure it is up to date and conflict free.. :)

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

Successfully merging this pull request may close these issues.

OTLP proto encoding methods are missing instrumentation scope schema url and attributes
2 participants