How does the Datadog Exporter attach metrics to Hosts? #6125
-
Say we have the below pipeline:
Problem: All metrics are attached to the same Host (in Datadog's terminology), which is simply the host where our OpenTelemetry Collector is running. Expected: The collected metrics have a hostname label, and the corresponding Host entries should be listed in Datadog (in Infrastructure, and Host map, etc.), and the corresponding metrics should be associated to it. The Datadog Exporter code shows that it has some logic to translate various hostname labels and convert them as Hosts. However, I tried adding various labels to my Prometheus metrics ( So, what labels must be added to the metrics so that the Datadog Exporter creates the corresponding Hosts? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@mx-psi, @ericmustin and @KSerrania any idea? Thank you! 😊 |
Beta Was this translation helpful? Give feedback.
-
Maybe this is the solution: #6232 (Add support for metrics in groupbyattrsprocessor) |
Beta Was this translation helpful? Give feedback.
-
As @ericmustin mentioned, the Datadog exporter leverages the "hostname", "host.name" (and equivalent) on the Resource a Metric is attached to, to create the corresponding Hosts in Datadog. It doesn't use the attributes of the Metric itself (which makes sense). To solve the problem raised here, #6232 (Add support for metrics in groupbyattrsprocessor) must be implemented so that Prometheus metrics can be attached to Resources that are not just the exporter host itself. |
Beta Was this translation helpful? Give feedback.
As @ericmustin mentioned, the Datadog exporter leverages the "hostname", "host.name" (and equivalent) on the Resource a Metric is attached to, to create the corresponding Hosts in Datadog. It doesn't use the attributes of the Metric itself (which makes sense).
To solve the problem raised here, #6232 (Add support for metrics in groupbyattrsprocessor) must be implemented so that Prometheus metrics can be attached to Resources that are not just the exporter host itself.