This documentation describes the new tagging model for Latest Dynatrace. Some capabilities are still rolling out. If you're currently using Dynatrace Classic auto-tagging, see Dynatrace Classic versus Latest Dynatrace to understand how your existing setup maps to the new model.
OneAgent enriches telemetry at the source with primary Grail fields and tags before sending logs, metrics, spans, events, and entities to Dynatrace. This gives you consistent metadata across all signal types for segments, pipeline routing, bucket assignment, and cost allocation. Host-level enrichment automatically propagates to all Smartscape nodes (hosts, processes, containers, networks, disks) and their signals.
For general guidance on primary Grail fields and tags, see Primary tags. For general OneAgent documentation, see Dynatrace OneAgent.
| Platform capability | How enrichment helps |
|---|---|
Data routing | Route data to specific pipelines based on |
Bucket assignment | Assign target retention bucket based on |
Grail permissions | Derive security context for data access control |
Cost allocation | Track costs per team or product with |
Segments | Define segments based on tags and fields to filter data across Dynatrace apps |
Alerting | Create targeted alerts and notifications based on tags and fields |
Follow this hierarchy. Start with step 1 and continue only if the previous step doesn't meet your needs.
OneAgent automatically detects and enriches primary Grail fields such as dt.host_group.id without any manual configuration. When OneAgent runs on Kubernetes (typically rolled out via the Dynatrace Operator), k8s.cluster.name and k8s.namespace.name are also populated automatically. If these built-in fields cover your filtering and access control needs, no additional setup is required.
Define tags and fields directly on the host or process so data is enriched before it leaves the host. You can apply tags at two scopes:
--set-host-tag, or at any later point on an existing installation with oneagentctl --set-host-tag.DT_TAGS environment variable. Use this when different processes on the same host need different metadata, or when using serverless and managed container platforms where you can't configure the host itself, for example, AWS Lambda and Azure Functions. When the same key is set at both scopes, the process-level value wins for that process.Linux installer
Dynatrace-OneAgent-Linux.sh --set-host-tag="primary_tags.environment=production" --set-host-tag="dt.security_context=confidential"
Windows installer
.\Dynatrace-OneAgent-Windows.exe --set-host-tag="primary_tags.environment=production" --set-host-tag="dt.security_context=confidential"
oneagentctl
# Primary Grail fieldsoneagentctl --set-host-tag="dt.cost.costcenter=12345"oneagentctl --set-host-tag="dt.security_context=confidential"# Primary Grail tagsoneagentctl --set-host-tag="primary_tags.environment=production"oneagentctl --set-host-tag="primary_tags.team=bravo"
On serverless platforms, OneAgent can't auto-detect certain primary fields. Provide them via DT_TAGS at deploy time:
aws.account.id, aws.regionazure.subscription, azure.resource.group, azure.locationUse Ingest enrichment configuration to apply primary tags and enrichments, including Security context, Cost center, and Cost product, to all telemetry coming from hosts and processes. With this approach:
Rules take effect on the next agent enrichment refresh cycle.
Enriching all data from a host based on a process or service property is not supported.
If your hosts already carry the context you want, through existing host tags, host groups, or a naming convention, you can promote it with Ingest enrichment configuration.
Ingest enrichment configuration requires OneAgent version 1.343+.
Go to
Settings > Collect and capture > Ingest enrichment configuration and select New rule. To automate rule creation instead, see the Ingest enrichment configuration schema for use with the Settings API.
Define the condition that selects the hosts and processes to enrich, using the input fields OneAgent provides (for example dt.host_group.id, host.name, host.tags.<key>, k8s.cluster.name, k8s.namespace.name, aws.account.id). Conditions support matchesValue (equals), matchesPhrase (contains, begins/ends with), isNull, isNotNull, and the AND, OR, NOT operators.
matchesValue(dt.process_group.detected_name, "example-process-name")matchesPhrase(host.name, "prod-host-")See the DQL string functions documentation for details on matchesValue and matchesPhrase.
Define the enrichments to apply. Enter either a static value or a DPL transformation on an input field.
Review the Resulting mapping preview. It shows how the input fields are mapped onto all telemetry from the matching hosts and processes.
Select Create.
Enrichments defined on a host are inherited by the processes, containers, disks, and network interfaces on that host. Enrichment keys are stored under primary_tags.<key>, except for dt.cost.costcenter, dt.cost.product, and dt.security_context, which are applied as-is.
You can also add a Custom rule that enriches a static string literal on all telemetry from the matching hosts and processes. The static literal can be used as Security context, Cost center, Cost product, or directly as a primary tag.
If meaningful metadata is encoded in the host name or process group name, use a DPL transformation on the input field to derive one or more primary tags. A single transformation can populate multiple tags. If the pattern doesn't match, no tag is applied. There is no partial output.
The Dynatrace Pattern Language (DPL) support in OneAgent covers the core structural building blocks of the language.
| Construct | Supported |
|---|---|
| |
Single-quoted ( | |
| |
Grouping | Sequence groups ( |
Quantifiers ( |
For a naming convention <env>-<team>-<region>-<role>-<index> (for example prod-payments-eu-web-01), create 5 separate rules:
host.name as the source attribute and targets a primary tag.matchesPhrase(host.name, "*-*-*-*-*").| Rule | Primary tag key | Resulting mapping | Value extraction expression |
|---|---|---|---|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
If host.name doesn't match the expected five-segment pattern, the DPL extraction fails, and no tag is applied for that rule. There is no partial output.
Ingest enrichment configuration is supported at the environment scope and host group scope. Set a broad rule at environment scope and fine-tune it with a more specific rule at host group scope. When the same key is set at multiple scopes, the more specific definition wins, in which case the host group scope takes precedence over the environment scope.
Rule order matters: reorder rules by dragging them in the configuration page to change which one takes precedence.
When the same key is defined multiple times within a single source, the first matching rule wins.
isNull(isNotNull(x))) are not supported.If none of these approaches work, use OpenPipeline primary Grail tag rules to derive or assign primary tags at ingest-processing time. Use this as a fallback for environments with constraints that prevent enrichment at an earlier stage.
When the same key is set at multiple scopes, the more specific definition wins:
DT_TAGS)oneagentctl)Host-level tags fill in any keys that the process didn't override.
| Resource | Enrichment level | Defined values | Enrichment result |
|---|---|---|---|
Host |
|
|
|
.NET Process |
|
|
|
Java Process |
|
|
|
Any other process | — | — |
|
The following table shows which enrichment methods are available in each environment.
Enrichment on Kubernetes requires OneAgent to be deployed via the Dynatrace Operator. Namespace labels and annotations can also be promoted through Kubernetes-side central configuration and reach OneAgent-emitted signals. For details, see Domain: Kubernetes.
Serverless workloads run only the OneAgent code module, so the installer, oneagentctl, and ingest enrichment configuration are not available. Ingest enrichment configuration would also introduce startup latency that's incompatible with these low-latency, volatile workloads. Enrich tags and fields through DT_TAGS when deploying the workload.
On mainframe, process-level enrichment is configured in the zremoteagentuserconfig.conf file, not via DT_TAGS.
Primary Grail fields and tags appear as top-level fields and can be queried with DQL:
fetch spans| filter primary_tags.team == "bravo" AND primary_tags.environment == "production"
fetch bizevents| filter dt.cost.costcenter == "payments"| summarize sum(value), by: {dt.cost.product}
fetch logs| filter dt.security_context == "confidential"| filter primary_tags.application == "payment-processing"
zremoteagentuserconfig.conf file rather than DT_TAGS. Host-level enrichment and ingest enrichment configuration are not supported.