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

[datadogexporter] Fix missing resource attributes default mapping when resource_attributes_as_tags: false #6359

Conversation

KSerrania
Copy link
Contributor

@KSerrania KSerrania commented Nov 17, 2021

Description:
Since #5431, 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.

Link to tracking Issue: n/a, found during testing.

Testing: Added unit tests.

Documentation: n/a

@KSerrania KSerrania force-pushed the kserrania/fix-resource-attributes-mapping branch 2 times, most recently from dae79da to 87adc7c Compare November 17, 2021 11:27
@KSerrania KSerrania force-pushed the kserrania/fix-resource-attributes-mapping branch from 87adc7c to 27e92a5 Compare November 17, 2021 11:28
func newTranslator(t *testing.T, logger *zap.Logger) *Translator {
tr, err := New(
logger,
func newTranslator(t *testing.T, logger *zap.Logger, resourceAttributesAsTags, instrumentationLibraryMetadataAsTags bool) *Translator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe adding a options ...Options argument list instead is better to avoid having to change the function signature for every new thing that we want to test

@KSerrania KSerrania marked this pull request as ready for review November 17, 2021 14:17
@KSerrania KSerrania requested review from a team and kbrockhoff November 17, 2021 14:17
@bogdandrutu bogdandrutu merged commit df3eff6 into open-telemetry:main Nov 17, 2021
KSerrania added a commit to DataDog/datadog-agent that referenced this pull request Nov 18, 2021
…rce_attributes_as_tags: false (#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.
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.
povilasv referenced this pull request in coralogix/opentelemetry-collector-contrib Dec 19, 2022
* [docs] update design.md doc

Started looking at various documents under the `docs` directory that are somewhat outdatted. This PR updates the design document.

* Apply suggestions from code review

Co-authored-by: Anthony Mirabella <[email protected]>

Co-authored-by: Anthony Mirabella <[email protected]>
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.

5 participants