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

[pkg/otlp] Fix missing resource attributes default mapping when resource_attributes_as_tags: false #9946

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

KSerrania
Copy link
Contributor

What does this PR do?

Backport of open-telemetry/opentelemetry-collector-contrib#6359.
Fixes the additional tags list not getting correctly set when resource_attributes_as_tags: false and instrumentation_library_metadata_as_tags: false.
Adds unit tests.

Motivation

Since #9472, when resource_attributes_as_tags: false and instrumentation_library_metadata_as_tags: false (default config), the default resource attributes mapping done by attributes.TagsFromAttributes wouldn't be added to the metric tags.

Describe how to test/QA your changes

Run the Agent with the OTLP pipeline, with the default settings. Check that the resource attributes that should be converted by default (eg. development.environment) are indeed converted into their corresponding tags.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • The appropriate team/.. label has been applied, if known.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the config template has been updated.

@KSerrania KSerrania merged commit 8646e6e into main Nov 18, 2021
@KSerrania KSerrania deleted the kserrania/backport-opentelemetry-6359 branch November 18, 2021 09:08
@mx-psi mx-psi added the component/otlp PRs and issues related to OTLP ingest label Feb 17, 2022
zandrewitte pushed a commit to StackVista/stackstate-agent that referenced this pull request Nov 17, 2022
…rce_attributes_as_tags: false (DataDog#9946)

Backport of open-telemetry/opentelemetry-collector-contrib#6359.
Fixes the additional tags list not getting correctly set when `resource_attributes_as_tags: false` and `instrumentation_library_metadata_as_tags: false`.
Adds unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants