Try it free

Configure cost allocation

  • Latest Dynatrace
  • How-to guide
  • 6-min read
  • Published Jul 23, 2026

Dynatrace provides two cost allocation attributes—dt.cost.costcenter and dt.cost.product—as part of the primary Grail field set. These attributes enable precise attribution of Dynatrace consumption (DPS) to organizational units, applications, or cost centers.

The general principle mirrors security context configuration: enrich telemetry with cost allocation attributes as early as possible, ideally at the source, and align with your existing organizational structure and deployment scopes.

OneAgent deployments

The approach for OneAgent-based deployments depends on the required granularity.

Host or host-group level granularity

If cost attribution at the host group level is sufficient, the preferred approach is to map deployment-level primary Grail fields such as dt.host_group.id or host.name to dt.cost.costcenter and dt.cost.product via the Cost Allocation stage in OpenPipeline.

At-source via host tags

You can also set dt.cost.costcenter and dt.cost.product directly as host tags during OneAgent installation or via the central primary Grail tag configuration. This ensures the cost allocation attributes are present on all telemetry from that host.

Process-level granularity

For shared infrastructure where different processes should be attributed to different cost centers, use the DT_TAGS environment variable to set dt.cost.costcenter and dt.cost.product on each process.

For details, see Set up cost allocation for OneAgent deployments.

Kubernetes deployments

For Kubernetes, the approach depends on whether cluster or namespace-level granularity is sufficient or whether finer-grained attribution is needed.

Cluster or namespace level

Map k8s.cluster.name or k8s.namespace.name to dt.cost.costcenter and dt.cost.product via OpenPipeline.

Namespace labels

Where you already have cost center and product information in Kubernetes namespace labels or annotations, use Kubernetes metadata enrichment to map those labels directly to dt.cost.costcenter and dt.cost.product. This materializes the cost allocation attributes across all Kubernetes-generated telemetry.

Pod-level granularity

Dynatrace supports finer-grained approaches such as DynaKube custom resources or dedicated pod annotations.

Pod annotations don't enrich Kubernetes metrics, events, Smartscape entities, or Prometheus metrics. They only apply to logs and spans from the annotated pods.

Complex attribution strategies

For cost allocation based on combinations of labels and metadata, enrich telemetry with the relevant labels first, then use OpenPipeline processing to derive dt.cost.costcenter and dt.cost.product.

For details, see Set up cost allocation for Kubernetes deployments.

Related topics

  • Organize your data with primary Grail fields and tags
  • Primary Grail fields and tags
  • Best practices for enriching primary Grail fields and tags
  • Scope Dynatrace configuration with DQL matchers
  • Configure security context
  • Set up Cost Allocation for OneAgent deployments
  • Set up Cost Allocation for Kubernetes deployments
  • Cost allocation via OpenPipeline
Related tags
Dynatrace Platform