Open millerick opened 4 years ago
Hey @millerick
Thanks for reaching out! There is a simple explanation to this behavior: Host tags are not sent along with metrics, logs nor traces. They are sent once, when the agent starts, along other host related data like the hostname. Host tags are then reconciled on our backend thanks to... the hostname!
So, if you change the host tag on one of your custom metric or check metric, the backend will not be able to find the right host and thus, the right tags.
I hope it makes sense!
Let us know if you have further questions.
@Simwar , is there a way to omit the addition of the host
tag while still having the DD_TAGS
tags applied? Context is that the tag cardinality that host
tag creates for some metrics is large and is rarely used in a meaningful way for our own observability purposes, but the tags added via DD_TAGS
are often times useful and low cardinality.
@Simwar , another question: if the agent makes the call once on startup, how long does the host:DD_TAGS
mapping stay in the system? I.e. if we start an agent on a host, and supply that as the host
tag for a multitude of metrics, but then that host ceases to exist at some point in the future, will the original DD_TAGS
eventually cease to be associated with the metrics?
@Simwar , following up on this question
Is there a way to omit the addition of the host tag while still having the DD_TAGS tags applied? Context is that the tag cardinality that host tag creates for some metrics is large and is rarely used in a meaningful way for our own observability purposes, but the tags added via DD_TAGS are often times useful and low cardinality.
Output of the info page (if this is a bug)
Describe what happened: We tried supplying the
host
tag with a metric to suppress the agent from adding its own host information, since the host information is not relevant for some of our metrics. When we did this, other tags that are specified usingDD_TAGS
environment variable were not attached to the metric, but our manually specifiedhost
tag was.Describe what you expected: Global tags specified by
DD_TAGS
should always be attached to a metric, regardless of what other tags are submitted. Tag values that are explicitly submitted with a metric should take precedence over the values specified inDD_TAGS
.Steps to reproduce the issue:
environment:sandbox
usingDD_TAGS
host:foobar
as a tag along with a metrichost:foobar
tag appears in datadog, butenvironment:sandbox
tag does not. Ifhost:foobar
is not submitted as a tag on the metric, observe that theenvironment:sandbox
tag will appear.Additional environment details (Operating System, Cloud provider, etc): I believe enough information is specified in the agent information page. Let me know if more information would be useful.