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.
Dynatrace enables you to enrich telemetry from extensions with primary Grail fields and tags, which you can use for segments, pipeline routing, bucket assignment, Grail permissions, and cost allocation, consistently across logs, metrics, spans, events, and Smartscape entities.
Enrichment can be configured per monitoring configuration of an extension, allowing you to define primary Grail fields and tags for your different deployments of the same extension.
The two extension types differ in how enrichment works:
For general guidance on primary Grail fields and tags, see Primary tags.
For local extensions, OneAgent automatically detects and enriches primary Grail fields such as dt.host_group.id without any manual configuration. Extensions deployed in a Kubernetes environment are also automatically enriched with k8s.cluster.name and k8s.namespace.name. If these built-in fields cover your filtering and access control needs, no additional setup is required.
Enrichment can be set at two levels within a monitoring configuration. Most support both levels, but some don't define individual endpoints—in those cases, only whole-configuration enrichment applies.
Select your preferred method.
You can set primary Grail fields and tags at both levels directly in the Dynatrace UI.
Local extensions support primary Grail tags only.
Extensions Dynatrace > Extensions and select your extension.Use the Extensions API to set primary fields and tags on an extension monitoring configuration. The top-level primaryTags and primaryFields properties apply to the whole configuration.
Local extensions accept primary Grail tags only. Providing primaryFields has no effect.
PUT /api/v2/extensions/{extensionName}/monitoringConfigurations/{configurationId}
{"primaryTags": [{"key": "primary_tags.environment","value": "production"},{"key": "primary_tags.team","value": "platform"},{"key": "primary_tags.application","value": "metrics-ingestion"}]}
Enrichment can also be set per endpoint. The exact location in the request body depends on the extension's configuration schema.
When the same key is set at multiple levels, the most specific definition wins. Endpoint-level enrichment takes priority over extension configuration enrichment, which in turn takes priority over host-level enrichment.
Remote extensions
Local extensions
oneagentctl or host metadata)For both extension types, endpoint-level tags and fields override the extension configuration values for matching keys. Keys not set at the endpoint level fall back to the extension configuration. For local extensions, keys not set in the monitoring configuration at all fall back to the OneAgent host.
A remote extension has no host to inherit from. The monitoring configuration sets the base enrichment. One endpoint overrides the environment tag.
| Level | Defined values | Enrichment result |
|---|---|---|
Configuration |
|
|
Endpoint |
|
|
A host is configured with primary_tags.environment=production and primary_tags.team=platform via oneagentctl. The monitoring configuration overrides the environment tag for all endpoints. One endpoint overrides it again.
| Level | Defined values | Enrichment result |
|---|---|---|
Host (oneagentctl) |
|
|
Configuration |
|
|
Endpoint |
|
|
Local extensions automatically inherit both primary Grail fields and primary Grail tags from the OneAgent they run on. Any enrichment configured through the OneAgent enrichment guide—whether at install time, via oneagentctl, or through central configuration—is passed down to every local extension on that host as the base layer of enrichment.
You can also set primary tags explicitly at the host level using oneagentctl. This is useful when you want consistent tags across every local extension on a host without configuring each monitoring configuration individually.
oneagentctl --set-host-tag="primary_tags.environment=production"oneagentctl --set-host-tag="primary_tags.team=platform"
For the full set of host-level and process-level options, see the OneAgent enrichment guide.
Primary Grail fields and tags applied through extension configuration appear as top-level fields and can be queried with DQL:
fetch metrics| filter primary_tags.team == "platform" AND primary_tags.environment == "production"
fetch metrics| filter dt.cost.costcenter == "12345"| summarize sum(value), by: {dt.cost.product}
fetch logs| filter dt.security_context == "confidential"| filter primary_tags.application == "metrics-ingestion"