-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
datadog: document resource_attributes_as_tags behaviour and tag mapping, link to docs for actual mappings #29702
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I've since found that while the code in Maybe the dead code should be removed or commented as a no-op? There are datadog docs for the mapping of attributes too, they're just hard to find (not linked from other relevant docs), outdated and incomplete. See DataDog/opentelemetry-mapping-go#156 (comment) and particularly https://docs.datadoghq.com/opentelemetry/guide/semantic_mapping/ . The support team pointed these out to me; I didn't find them from reading other articles on the DD site. |
Removes call to `metrics.WithResourceAttributesAsTags()` which is a no-op. This option is picked up here: https://github.com/DataDog/datadog-agent/blob/main/comp/otelcol/otlp/internal/serializerexporter/factory.go#L60. This option will been removed from `pkg/otlp/metrics` in this PR: DataDog/opentelemetry-mapping-go#219 This was flagged here: open-telemetry#29702
**Description:** Removes call to `metrics.WithResourceAttributesAsTags()` which is a no-op. This option is picked up here: https://github.com/DataDog/datadog-agent/blob/main/comp/otelcol/otlp/internal/serializerexporter/factory.go#L60. This option will been removed from `pkg/otlp/metrics` in this PR: DataDog/opentelemetry-mapping-go#219 **Link to tracking Issue:** Closes #29702 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
**Description:** <Describe what has changed.> This PR improves documentation of `resource_attributes_as_tags`. **Link to tracking Issue:** Closes #29702 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
Thanks very much for following up on it. Appreciated. I'd raised a docs PR to tweak some of the docs already, as linked above, but I didn't want to go through all of it. |
Component(s)
exporter/datadog
Is your feature request related to a problem? Please describe.
The datadog exporter has a
resource_attributes_as_tags
option but it's lightly documented, and unclear what exactly its behaviour is.Exactly what " small predefined subset of resource attributes" is converted to metric tags, and using what rules/mapping/logic?
Edit: This should link to https://docs.datadoghq.com/opentelemetry/guide/semantic_mapping/
Can this mapping be overridden/extended, or is it hard-coded?
Edit: It's hard coded in https://github.com/DataDog/opentelemetry-mapping-go/tree/main/pkg/otlp/attributes/attributes.go and is not extensible.
~~I've read the code and followed the breadcrumbs to https://github.com/DataDog/opentelemetry-mapping-go/blob/main/pkg/otlp/metrics/metrics_translator.go#L72
ResourceAttributesAsTags
but as far as I can tell it doesn't actually do anything. ~~ Edit: This was because the DD platform offers no way to see the actual incoming metrics stream with individual datum tags so I couldn't tell that it'd stopped sending some tags for metrics.I tripped over DataDog/opentelemetry-mapping-go#156 in the process of looking it up. Does it really just do nothing?
Edit: Yes, that code does nothing.
resource_attributes_as_tags
has an effect but it's implemented elsewhere, the code inopentelemetry-mapping-go
is a stub that does nothing.Describe the solution you'd like
Documentation on the mapping of resource attributes to tags, both with and without the
resource_attributes_as_tags
setting. Clearly linked and discoverable, and up to date.Coverage of how this mapping may affect metric cardinality.
A means of overriding or extending the built-in mapping.
Describe alternatives you've considered
I've read the code and followed the breadcrumbs to https://github.com/DataDog/opentelemetry-mapping-go/blob/main/pkg/otlp/metrics/metrics_translator.go#L72
ResourceAttributesAsTags
but as far as I can tell it doesn't actually do anything.Some more digging revealed https://github.com/DataDog/opentelemetry-mapping-go/blob/main/pkg/otlp/attributes/attributes.go#L29 as the likely location of the hardcoded mapping of OpenTelemetry semantic conventions values to Datadog tags.
It'd really be better not to have to dig through the code to find this fairly fundamental info.
Additional context
Issues open on the mapping repo:
This is made more confusing by there seeming to be no way to get the DD exporter to log what it really sends for metrics payloads: #29701
It looks like this mapping is not done for
host_metadata
discovery tags: #29700The text was updated successfully, but these errors were encountered: