Unified Service Tagging
Unified Service Tagging is the Datadog convention of attaching the reserved tags env / service / version with the same values to all of your metrics, traces, and logs. Once they are aligned, you can filter by the same conditions across products.
Overview
env represents which environment, service represents which group of work, and version represents which deployment, and Unified Service Tagging is the collective name for the settings that make these three match across all data. It matters when the service name changes as you move from a trace to logs, when version does not appear in deployment tracking, and when you are unsure whether to write the values in labels or in environment variables on Kubernetes or Docker. Writing them in one place does not attach them to everything; the scope that takes effect differs by where you write them.
Where do things break when the three reserved tags are not aligned?
If even one of the three, env / service / version, has a different value for each kind of data, moving across products breaks. If service differs between traces and logs, filtering by the same service name brings up only one of the two, traces or logs. Data missing env drops out of the list the moment you filter by environment, and without version you cannot compare old and new code separately. The official documentation positions these three as the reserved tags that connect products to one another, and assumes Agent 6.19.x / 7.19.x or later (as of October 2026; Source: Unified Service Tagging). For why version should change with each deployment, see the Tagging explainer; for the rules of reserved tags, see Tag.
Where you write them determines which data they attach to
There is not just one place to write them, and the scope they attach to differs by route.
| Where you write them | What they attach to (data) |
|---|---|
Labels on Kubernetes workloads and Pod templates, such as tags.datadoghq.com/env | Kubernetes CPU / memory / network / disk metrics, container tags, log collection, Kubernetes State Metrics |
Docker labels such as com.datadoghq.tags.env | Data the Agent collects from that container (software that does not read environment variables also gets them from the labels alone) |
Application environment variables DD_ENV / DD_SERVICE / DD_VERSION | Traces produced by the SDK, custom metrics sent by the DogStatsD client (.NET and PHP are excluded), and logs with automatic log injection enabled |
Agent configuration (datadog.tags in Helm; for non-container environments, env and tags in datadog.yaml) | Attached as host tags to all data that Agent emits, and also becomes the default env for APM spans |
The official complete configuration is the form that writes both labels and environment variables. Agent configuration applies per host, so if multiple services run on one host, it does not serve as the place to write service.
On Kubernetes, copy the labels into environment variables
The Agent reads env from the Pod label tags.datadoghq.com/env or the environment variable DD_ENV (as of October 2026; Source: Kubernetes Tag Extraction). The official example treats the labels as the source of truth and copies them into DD_ENV and the others through the downward API. If you are rewriting Pods with the Admission Controller of the Cluster Agent, the three environment variables are injected automatically to match the labels. When one Pod has multiple containers, split the values per container in the form tags.datadoghq.com/<CONTAINER_NAME>.service. For installation steps, see the article on installing with Helm.
Where does service split into two?
When the same application appears as two services, the cause is a mismatch between the places the values are written. Without an Autodiscovery log configuration, the service of the logs becomes the short name of the image and diverges from DD_SERVICE (as of October 2026; Source: Unified Service Tagging). If you give the host tags a service, that service is also attached to the trace metrics coming from that host. Tags on custom metrics are additive: if env arrives in two variants, both are attached, and there is no order in which one wins.
- Decide the service name of the traces (
DD_SERVICE) as the source of truth - Give the logs the same service value (through an environment variable or label, or through the Autodiscovery log configuration)
- Remove host-level service tags and move them to per-service places
- Pass version from your build or deployment mechanism
Even if you forget to write version, APM data in container environments is filled in from the image tag or the Git commit SHA with Agent 7.52.0 or later. For overriding inside the SDK, see Service (APM).
Cross-check the three values on one of your own services
If you line up env / service / version for traces, logs, and metrics for one service, you can tell whether the settings are taking effect. If the service name changes when you move from logs to traces, a place to write it on the log side is missing. If version does not switch right after a deployment, the value is not being passed from the deployment mechanism. If you line up the three values across the three kinds of data for one production service, the table of places to write them tells you where to fix the columns that disagree.