DataDog / opentelemetry-mapping-go

Go modules that implement OpenTelemetry-to-Datadog mapping for all telemetry signals
Apache License 2.0
14 stars 6 forks source link

Otel resource attribute cloud.availability_zone mapped to "zone" tag not "availability-zone" tag #214

Open ringerc opened 11 months ago

ringerc commented 11 months ago

https://github.com/DataDog/opentelemetry-mapping-go/blob/5432be02915e24c7e8a294cd4a17877016f9b73d/pkg/otlp/attributes/attributes.go#L53

This mapping sends cloud.availability_zone as the datadog tag zone. But the docs it links to, https://www.datadoghq.com/blog/tagging-best-practices/, say that the tag name should be availability-zone.

One of them is presumably wrong.

The host inventory uses availability-zone so unless the metrics backend on DD uses zone instead for some reason, this code might be mistaken/outdated.

ringerc commented 10 months ago

Discussed with DD support. The support team says that "availability-zone" is just the default tag used in the host infra view, and is only used for AWS anyway. So they don't consider sending zone on metrics vs the UI expecting availability-zone in the host inventory to be an issue.

But the code is still inconsistent with the docs it links to and the UI's expectations.

I took a quick look at the DD agent code but couldn't immediately see which it sends. I did notice that in my production account the agent isn't sending any cloud AZ info at all for my Azure hosted nodes; there's no cloud metadata attached to the metrics at all, only kube metadata.

atmask commented 7 months ago

Has there been any resolution as to how to set the availability-zone in the infrastructure map view? I am currently passing the zone under the resource attribute cloud.availability_zone, cloud.availability-zone, and cloud.zone. If I just have cloud.availability_zone it gets mapped to the tag zone but not availability

ringerc commented 3 months ago

From my last conversations with DD folks before I dropped my use of the product there was no fix for this.