Tags help you investigate and understand your cloud and SaaS costs across any dimensions. Tags consist of tag keys and values. For example, in aws_product:ec2, the tag key is aws_product, and the value is ec2.
Cloud Cost Management automatically enriches your cost data with tags from multiple sources, to help you achieve better cost allocation and get deeper insight into who owns infrastructure costs in your ever-changing cloud environments. Using tags, you can allocate shared costs fairly, create accurate reports, and track costs by team, service, or environment.
Where tags come from
Across all cloud and SaaS providers, Datadog collects tags from the following sources (including enriching cost data with data from other Datadog products) and adds them to your cost data:
Source
What tags are collected
Description
All Providers
Bill columns
Such as AWS Cost and Usage Report (CUR) columns, Google Billing Export columns, and so on
Datadog Enrichment
Host Agent
Tags added to host metadata by the Datadog Agent running on the host
Datadog Enrichment
Software Catalog
Tags associated with this service in the APM Service Catalog
Datadog Enrichment
Integration Tiles
Tags added to the Datadog integration tile for a specific cloud account. Integration tile tags apply to all costs in that account. Requires enabling the provider integration for each account
Datadog Enrichment
Data Observability
Tags from Datadog Data Observability, powering BigQuery cost allocation. Requires enabling BigQuery monitoring
User-defined tags found on Kubernetes nodes monitored with Datadog
Kubernetes Enrichment
Kubernetes Pod
User-defined tags found on Kubernetes pods monitored with Datadog
Kubernetes Enrichment
Kubernetes Persistent Volume
User-defined tags found on Persistent Volumes in Kubernetes clusters monitored with Datadog
Kubernetes Enrichment
Kubernetes Persistent Volume Claim
User-defined tags found on Persistent Volume Claims in Kubernetes clusters monitored with Datadog
Cloud Cost Management
Cloud Cost Aliases
Tags derived from provider cost data to simplify the cost data model, such as aws_product (an alias of lineItem/ProductCode). Additional tags that exist on both cost data and integration metrics are added, allowing cost data and usage data to be combined in Custom Allocation Rules, dashboards, and notebooks
Cloud Cost Management
Cloud Cost Allocation
Tags created during cost allocation that specify the split of shared resources, such as allocated_spend_type
Cloud Cost Management
FOCUS
Provider-agnostic tags compliant with FOCUS, an open specification that normalizes cost and usage datasets across cloud vendors
Tag Pipelines
Rules defined by user
Tags created by applying your Tag Pipelines to cost data
Custom Allocation Rules
Rules defined by user
Tags created by applying your Custom Allocation Rules to cost data (does not apply to SaaS costs)
Datadog also adds provider-specific tags:
Provider
What tags are collected
Description
AWS
Cost Allocation Tags
Any tag defined by the user in AWS Cost Allocation tags that show up in the AWS CUR
AWS
AWS Resource Groups Tagging API
User-defined tags on a cloud resource in AWS, pulled by Cloud Cost Management using the Groups Tagging API
AWS
AWS Organizational Units
User-defined tags on AWS organizational units using AWS Organizations
User-defined tags on a container running in an ECS task
Azure
Azure Cost Export - User Resource Tags
User-defined tags on a cloud resource in Azure, found in the Tags column in the Azure cost export. Does not include Resource Group tags
Azure
Azure Cost Export - System Resource Tags
Azure-defined tags on a cloud resource, found in the AdditionalInfo column in the Azure cost export
Google Cloud
Google Billing Export - Project Labels
User-defined labels on a project in Google Cloud, found in the project.labels column in the billing export
Google Cloud
Google Billing Export - System Resource Labels
System-generated labels on a resource in Google Cloud, found in the system_labels column in the billing export
Google Cloud
Google Billing Export - User Resource Labels
User-defined labels on a cloud resource in Google Cloud, found in the labels column in the billing export
Google Cloud
Google Billing Export - User Resource Tags
User-defined tags on a cloud resource in Google Cloud, found in the tags column in the billing export. The goog-originating-sku-description tag is added leveraging Google’s SKU APIs, to provide more granular SKU details for commitment line items.
Google Cloud
GKE Pod
User-defined labels found on pods running in Google Kubernetes Engine
Oracle Cloud
OCI Cost Export - User Resource Tags
User-defined tags on a cloud resource in Oracle Cloud Infrastructure, from the Tags column in the OCI FOCUS cost export
Datadog
Datadog Usage Attribution
User-defined tags for Usage Attribution in Datadog Plan and Usage
Custom Costs
Cost File Tags
User-defined tags for every provider, found on cost files uploaded to Cloud Cost Management
How tags are normalized
Tag keys and values may look slightly different in Cloud Cost Management compared to the providers or other parts of Datadog because of tag normalization.
Cloud Cost Management normalizes tag keys in a similar way to Datadog Metrics:
Drop leading characters that are not letters
Lowercase all characters
Replace special characters and spaces with single underscores _
Remove any trailing underscores
Reduce contiguous underscores to a single underscore
Tag keys up to 5000 characters are supported, and any characters before the first letter are dropped so that tag keys start with letters (different from Datadog Metrics)
Cloud Cost Management normalizes tag values as well, while maintaining human readable tag values for cost reporting. For example, aws_instance_family:Machine Learning ASIC Instances remains readable rather than being converted to something like machine_learning_asic_instances. The normalization follows this logic:
Convert any consecutive whitespaces to a single space
Keep all letters, marks, numbers, punctuation, and symbols
Replace any other characters with an underscore _
Tag values up to 5000 characters are supported
How tags are prioritized
A cost data row can have multiple values for the same tag key when tag values from two or more sources are combined and one is not prioritized over the other.
To resolve conflicts and mitigate this, Cloud Cost Management replaces existing tags instead of adding duplicates using the most specific source for each tag key. For example, a Kubernetes Pod tag team:shopping would take precedence and replace a Kubernetes node tag team:compute.
Sources higher in this list replace tag values from sources lower in this list, if there are conflicts:
Custom Allocation Rules
FOCUS
Service Catalog
Amazon ECS Container
Amazon ECS Task
Kubernetes Pod
Kubernetes Persistent Volume
Kubernetes Node
Host Agent
Other tag sources (such as AWS Organization tags, integration tile tags, and similar sources) can be overridden by these sources. Bill columns and FOCUS columns are reserved and cannot be overridden by any source. Tag Pipelines add new tags but do not override existing tags.
Improving tagging
Understand what tags exist - Use the Tag Explorer to discover which tags are already available in your cost data.
Identify gaps in cost allocation - In the Explorer, group by any tag to see the cost allocated to that tag, or unallocated (which is displayed as N/A). Make sure to have “Container Allocated” enabled so that you are looking at a cost allocation that includes tags on pods.
Split up shared costs - Use Custom Allocation Rules to split and assign shared costs back to teams, services, and more. You can use observability data to split costs accurately based on infrastructure usage.
Address missing or incorrect tags - Use Tag Pipelines to alias tags, or create a new tag, for incorrect tagging. For example, if your organization wants to use the standard application tag key, but teams use variations (like app, webapp, or apps), you can consolidate those tags to become application for more accurate cost reporting.
Add new tags - Use Tag Pipelines to automatically create new inferred tags that align with specific business logic, such as a business-unit tag based on team structure.
Further reading
Additional helpful documentation, links, and articles: