Allocate your DPS costs

  • Latest Dynatrace
  • How-to guide
  • 16-min read

Cost Allocation is exclusively available for Dynatrace SaaS environments with a Dynatrace Platform Subscription (DPS) licensing agreement that was signed after April 2023.

Dynatrace Cost Allocation lets you allocate Dynatrace DPS usage to customer-defined cost centers, products, or both. This gives you a transparent and detailed account of each cost center’s Dynatrace expenditures, helping your organization optimize its budgets.

You can customize the use of these fields to fit your company's organizational framework:

  • Data is collected from all OneAgents deployed on hosts or Kubernetes pods.

  • Additionally, ingested telemetry data (traces and logs) can be collected in certain infrastructure setups (e.g., via Logs API or Kubernetes metadata enrichment).

  • Costs can be allocated to customer-defined cost centers, products, or both.

  • Data can be:

    • Analyzed in Dynatrace via DQL, Dashboards Dashboards, or Notebooks Notebooks.
    • Exported for viewing and editing in separate tools such as Excel and Power BI.

The figure below shows how different components in a given Dynatrace environment can be assigned to different cost centers and products.

Concepts

Cost center

A specific cost center within your organization. This is defined according to your organizational structure. Costs in Dynatrace can be allocated to specific cost centers.

Host tag

The parameter that assigns a host to a specific cost center or product. For more information, see Define tags and metadata for hosts.

Host property

Sometimes used as a synonym for "host tag." For more information, see Define tags and metadata for hosts.

Product

A single product, or group of products, offered by your organization. Costs in Dynatrace can be allocated to specific products.

Telemetry data

Generic term to refer to any single data point that is one of the following: log, trace, metric, or event.

Required permissions

To view or edit Cost Allocation information, your Dynatrace account needs at least one of the permissions as indicated in the table below. More information about these permissions is available at Role-based permissions.

Account Management permissions

What you want to doView accountView and manage account and billing information

View Cost Allocation Allow List

Edit Cost Allocation Allow List

View usage/costs extract in Account Management

Environment-level permissions

The default policy "Read System Events" needs to be assigned to the relevant user group. The actual policy statement is provided in the code block below.

//Grail read data
ALLOW storage:buckets:read WHERE storage:table-name = "dt.system.events";
ALLOW storage:system:read;

If you will be using lookup tables to access Grail data, you will additionally need the permissions described in Lookup data in Grail.

Supported capabilities

The table below describes the rate card capabilities for which Cost Allocation is available.

In the case that Cost Allocation isn't available for the given capability, an alternative best practice is recommended.

CategoryCapabilityDPS Cost AllocationAlternative best practice

Application & Infrastructure Observability

Full-Stack Monitoring

Infrastructure Monitoring

Foundation & Discovery

Mainframe Monitoring

Classic metrics

Container Observability

Kubernetes Monitoring

Classic metrics

Application Security Protection

Runtime Vulnerability Analytics

Runtime Application Protection

Security Posture Management

Notebook available via Account Management

Digital Experience Monitoring

Real User Monitoring

Classic metrics

Real User Monitoring with Session Replay

Classic metrics

Real User Monitoring Property

Classic metrics

Browser Monitor or Clickpath

Classic metrics

Third-Party Synthetic API Ingestion

Classic metrics

HTTP Monitor

Classic metrics

Metrics powered by Grail

Metrics - Ingest

Metrics - Retain

Notebook available via Account Management

Log Analytics

Log - Ingest

Log - Retain

Logs - Retain with Included Queries

Log - Query

See Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

Traces powered by Grail

Traces - Ingest

Traces - Retain

Notebook available via Account Management

Traces - Query

See Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

Events powered by Grail

Events - Ingest

Notebook available via Account Management

Events - Retain

Notebook available via Account Management

Events - Query

See Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

AppEngine Functions

AppEngine Functions - Small

See Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

Automation

AutomationWorkflow

See Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

Platform extensions

Custom Metrics Classic

Please switch to Metrics powered by Grail

Log Monitoring Classic

Please switch to Log Analytics

Custom Traces Classic

Please switch to Traces powered by Grail

Custom Events Classic

Please switch to Events powered by Grail

Serverless Functions Classic

Please switch to AppEngine Functions

We're continuously extending Cost Allocation support to cover additional Dynatrace capabilities. For complete details regarding your licensing agreement, please contact your Dynatrace account manager. For more details about specific capabilities, see Monitoring consumption per capability.

Set up Cost Allocation

This section describes how to set up Cost Allocation in your Dynatrace environment.

For tips on how to allocate shared costs, where a single host is used by multiple cost centers or products, see Handling shared costs.

Identify allowed cost centers and products

To configure Cost Allocation you need to explicitly define the cost centers and products to which costs are allocated. Up to 250 cost centers and 250 products can be defined.

The definitions are managed in two separate allow lists: the Cost center allow list and the Product allow list. You can configure these either via Account Management or via the Dynatrace API, as described below.

Changes to the allow lists are not applied retroactively. If you remove a cost center or product from its allow list, historical reports will still show the usage and costs associated with the value before it was removed.

Via Account Management

To find the two allow lists, go to Account Management > Subscription > Cost management. The allow lists are visible in the Cost center allow list and Product allow list sections.

To add a new cost center or product, select Cost center and follow the steps.

Via the API

Both the cost center and product allow lists can be configured via the Account Management API as described in Dynatrace Platform Subscription API - manage cost allocation.

Configure Cost Allocation for host-based deployments

To set up Cost Allocation in a host-based deployment, configure OneAgent according to the steps in Set up Cost Allocation for OneAgent deployments.

Cost Allocation is configured at the host level. One host can be allocated to a maximum of one cost center and one product.

Configure Cost Allocation for Kubernetes deployments

To set up Cost Allocation in a Kubernetes-based deployment, configure Kubernetes according to the steps in Set up Cost Allocation for Kubernetes deployments.

Cost Allocation is supported for different Kubernetes deployment models.

Configure Cost Allocation for telemetry ingest

With Dynatrace, you can enrich telemetry data with Cost Allocation attributes (dt.cost.costcenter, dt.cost.product) as metadata. Telemetry enrichment with Cost Allocation attributes is possible for all supported ingest methods–whether logs, traces, metrics, or events.

For ingested logs, Cost Allocation is also available for retained data (Log - Retain and Log - Retain with Included Queries). Both retain models use the settings that you already set up for ingest, so you don't need to do any additional configuration.

You can use these attributes to allocate usage to your user-defined products and cost centers.

  • They're stored in Grail and are available through Dashboards Dashboards, Notebooks Notebooks, Account Management, and the Dynatrace API.
  • They're defined in the Dynatrace Semantic Dictionary.

For more information on how to enrich telemetry data according to your use case, see Ingest data.

How to get started

No matter which method you use to ingest data, here's how to get going with Cost Allocation telemetry enhancement:

  1. Get an inventory of your ingest channels. List all the ways your organization sends logs and traces into Dynatrace. This could be via OneAgent, the log ingest API, cloud forwarders, log shippers, OpenTelemetry, or any one of the supported ingest methods.

  2. Review the documentation for your ingest method. Check the official Dynatrace documentation to find method-specific configuration and enrichment options.

  3. Map metadata opportunities: Identify your specific cost centers and products and then explicitly define them in Account Management. For more information, see Identify allowed cost centers and products.

Integrate Cost Allocation metadata

Don’t worry about perfection on day one. Start tagging now, even if it's just for one ingest channel. You can refine and expand to other ingest channels and telemetry types as your FinOps maturity grows.

Our available dashboard Cost Allocation pre-made dashboard can help you identify other ingest channels that you could consider enhancing with Cost Allocation data.

  1. For each ingest channel:

    • Review how metadata can be added. Depending on your ingest method, this could be via OneAgent configuration, API payload, cloud tag mapping, Kubernetes annotations, etc.
    • Implement tagging in your pipelines, scripts, or agent settings.
  2. Test your setup:

    • Send sample data and verify that cost allocation tags are present in Grail.

    • Use the pre-made dashboard to confirm that these tags are visible.

      Usage tracking for logs and traces is written every 15 minutes. So, it might take up to 15 minutes until you will see any results.

  3. Document your approach: Record which channels and tagging methods you use. This will help with future audits and troubleshooting.

Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions

This section describes how to configure Cost Allocation for queries, workflows, and functions. The relevant rate card categories are

Cost Allocation for queries, workflows, and functions is currently only supported at the environment level. Because of this, related data isn't included in exported data.

Consumption related to each of these categories is triggered by a specific Dynatrace user. Therefore, to allocate costs related to these categories, you'll map the user to the relevant Cost Allocation attributes (whether dt.cost.costcenter or dt.cost.product). To do this, follow the steps below.

1. Prerequisites

Make sure that you have the following permissions:

  • To set up this configuration: You need read, write, and delete permissions for Grail lookup tables. For more information, see Lookup data in Grail.
  • To use the dashboard: You need read permissions for Grail lookup tables.
2. Get the dashboard and notebook

The Cost Allocation dashboard and notebook are available as JSON files, which you can download from the Dynatrace GitHub repository.

Then upload/import the file to your Dynatrace environment, see Upload a dashboard and Import a notebook.

3. Map users to Cost Allocation metadata

In the notebook that you imported, set up the mapping between users and attributes.

  1. Create a list of users whose account activity you want to map to a given cost center or product.

    The Quickstart: Retrieve a list of active Dynatrace users card provides a list of all users who are active in the relevant environment.

    Each user is identified with an email and a unique user ID.

  2. Create a list of all cost centers and products that costs should be allocated to.

    The Fetch already used cost centers and Fetch already used products cards provide a list of all tags that are configured in your environment.

  3. For each user, create a JSON object that defines the user.email, user.id, dt.cost.costcenter, and dt.cost.product. Make sure that this object matches the JSON syntax shown in the code block below.

    {
    "user.email": "abc@de.fg",
    "user.id": "00000000-0000-0000-0000-000000000000",
    "dt.cost.costcenter": "a",
    "dt.cost.product": "1"
    }
  4. Once you've created JSON objects for each user, paste these into the Store user mapping within lookup table card. Note that you may need to select Show input to enter the JSON contents.

  5. Once you've entered all relevant JSON objects, select Run to upload the lookup table to your environment.

4. Update the prices according to your rate card

In the notebook you imported, set your prices for all the relevant rate card capabilities.

  1. In the Store rate card within lookup table - ADJUST PRICES card, enter your rate-card prices for all the relevant capabilities. An example for the Automation Workflow capability is shown below.

    {
    "key": "AUTOMATIONS",
    "name": "Automation Workflow",
    "price": "0.13",
    "currencyCode": "USD"
    }

    Note that you may need to select Show input to enter the JSON.

  2. Once you've updated the relevant prices, select Run to upload the lookup table to your environment.

5. Use the dashboard

Once you've configured the user mappings and the rate card prices, you can use the Cost Allocation with extended lookup tables dashboard to see costs related to queries, workflows, and functions.

To access the dashboard, go to Dashboards Dashboards and find the dashboard you uploaded.

If you see a The tabular file <file> doesn't exist. error message in your dashboard, the userdata or ratecard lookup tables are improperly configured. Repeat the steps in Map users to Cost Allocation metadata or Update the prices according to your rate card as appropriate.

Best practices

This section provides best practices for setting up Cost Allocation.

Cost center and product names

How you name your cost centers and products is up to you. We recommend:

  • For cost centers: Use the organizational level to which the costs belong.
  • For products: Use the application or product group to which the costs belong.

Values can be provided as text or numerical strings. If you have both, we recommend to use both the text-based name and the ID, separated by a comma (,) or slash (/). This lets you separate the name and ID after a data export.

Examples:

HostCost centerProduct

Host 1

dt.cost.costcenter=BusinessUnit1/Bu1

dt.cost.product=AppName/AppID

Host 2

dt.cost.costcenter=BusinessUnit2/Bu2

dt.cost.product=AppName/AppID

Host 3

dt.cost.costcenter=BusinessUnit2/Bu2

dt.cost.product=AppName/AppID

Handling shared costs

If your host shares services, Cost Allocation doesn't support costs billed to separate cost centers or products. However, you can create a cost center or product for that host and then allocate its costs outside of Dynatrace.

  1. Create a cost center or product for both entities, such as dt.cost.product="Webpage_MobileApp" for a host that should be allocated to both the webpage product and the mobile app product.
  2. When you want to analyze past data, retrieve the data from Account Management and import them into an Excel or Power BI board.
  3. You can take the host's total costs and split them according to your requirements.

DPS licensing consumption and related costs are based on 15-minute increments. Reports are generated daily, so you won't be able to see usage accrued in the previous <24 hours.

Analyze Cost Allocation data

To analyze Cost Allocation data, you can

Analyze in Dynatrace

Cost Allocation data is stored in Dynatrace Grail as billing usage events. These events can be analyzed

  • In Dashboards Dashboards and Notebooks Notebooks. Dynatrace provides a built-in Dashboard, DPS Cost Allocation usage & costs. Examples from this dashboard are provided below.
  • Via DQL queries. Example DQL queries are provided below.

Visit the Dynatrace DPS Cost Allocation community to see how other Dynatracers analyze their Cost Allocation data.

Analyze in Dashboards

To analyze Cost Allocation data you can use the Dynatrace pre-made dashboard.

Get the dashboard

The dashboard is available:

Limitations
  • The costs shown in the demo dashboard are based on manual cost assignments as provided in the DQL query.

  • The dashboard does not automatically account for included trace amounts. Therefore, the costs shown are actually higher than what you will be billed for. They're not automatically cross-checked with your rate card.

  • This dashboard currently does not display costs related to queries, Automation Workflows, and AppEngine Function invocations. To view Cost Allocation data for these DPS capabilities, see Configure user-based Cost Allocation for queries, Automation Workflow, and AppEngine Functions.

  • The pre-made dashboard is enough to get you going right away, but it is really intended as just a starting point. Please adapt the dashboard to fit to your needs and use-case scenarios.

Use DQL queries

This section provides various DQL queries that you can use to achieve specific use cases.

Fetch all Billing Usage Events in full detail (including Cost Allocation fields)
fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT"
Fetch all Billing Usage Events for all supported host-related capabilities and show only their capability, Host ID, and Cost Allocation fields
fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT"
| fieldsKeep event.type, dt.entitiy.host, dt.cost.costcenter, dt.cost.product
Check if any Cost Allocation fields are already configured
fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT"
| summarize count = count(), by:{event.type,dt.cost.costcenter}

Export Cost Allocation data

If you want to view Cost Allocation data in a separate tool, such as Excel or Power BI, you can export the data.

You can export Cost Allocation data via Account Management or the API.

DPS licensing consumption and related costs are based on 15-minute increments. Reports are generated daily, so you won't be able to see usage accrued in the previous <24 hours.

Export Cost Allocation data via Account Management

In Account Management, you can download some or all Cost Allocation data from your current DPS subscription.

  1. Go to Account Management.
  2. Select License > Cost Management > Cost Allocation > Download cost allocation report.
  3. Select the Commitment period for the relevant subscription.
  4. Select the timeframe from which data should be exported: enter the appropriate dates for From and To.
  5. Select Request download.
  6. An email will be sent to the email account of the logged-in user. The email is sent from noreply@dynatrace.com, so you might want to check your whitelist to make sure that you can receive emails from this account. It contains a download link for the CSV file, which is valid for 24 hours.

Export Cost Allocation data via the API

All Cost Allocation data can be retrieved via the API.

Before using the API, you need to generate an Account Management API Token as described in Authentication for the Account Management API. Additionally, your user will need the permission View usage and consumption: account-uac-read.

Use the following API call to retrieve Cost Allocation data. Parameters are described in Dynatrace Platform Subscription API - GET cost allocation.

GET /v1/subscriptions/{subscription-uuid}/cost-allocation?field={field}\&environment-id={environment-id}

An example response is provided in the code block below.

{
"records": [
{ "date": "2024-04-01", "capability": "FULLSTACK_MONITORING","key": "department-A", "costs": 10, "usage": 2000 },
{ "date": "2024-04-01", "capability": "FULLSTACK_MONITORING","key": "department-B", "costs": 40, "usage": 8000 },
{ "date": "2024-04-01", "capability": "LOGS", "key": "department-A", "costs": 70, "usage": 700 },
{ "date": "2024-04-01", "capability": "LOGS", "key": "department-B", "costs": 20, "usage": 200 },
{ "date": "2024-04-01", "capability": "FULLSTACK_MONITORING", "key": "department-E", "costs": 10, "usage": 2000 },
{ "date": "2024-04-01", "capability": "FULLSTACK_MONITORING", "key": "department-F", "costs": 50, "usage": 10000 },
{ "date": "2024-04-01", "capability": "FULLSTACK_MONITORING", "key": null, "costs": 60, "usage": 12000 },
{ "date": "2024-04-01", "capability": "LOGS", "key": null, "costs": 10, "usage": 100 },
{ "date": "2024-04-02", "capability": "FULLSTACK_MONITORING", "key": "department-A", "costs": 10, "usage": 2000 },
{ "date": "2024-04-02", "capability": "FULLSTACK_MONITORING", "key": "department-B", "costs": 40, "usage": 8000 },
{ "date": "2024-04-02", "capability": "FULLSTACK_MONITORING", "key": "department-C", "costs": 70, "usage": 14000 },
{ "date": "2024-04-02", "capability": "LOGS", "key": null, "costs": 500, "usage": 5000 }
// more daily records
],
"nextPageKey": "...",
"environmentId": "tenant-A",
"field": "COSTCENTER"
}

Troubleshooting

If you can't find Cost Allocation data:

  • Make sure you have a Dynatrace Platform Service (DPS) SaaS license.

  • Check your OneAgent version. Cost Allocation is supported for versions 1.291+.

  • Confirm that host tags are in the allow list.

    • Are all tag names correct?
    • Are all tags in Infrastructure & Operations Infrastructure & Operations also in the allow list?
    • If any used tags are not in the allow list, add them as described in Add host tags. Make sure that they're set on the OneAgent directly (i.e., via the command line), and not in the browser.
  • Did you perform a restart? When in doubt, restart OneAgent or your Kubernetes pod(s). Then wait up to 30 minutes and try again.

Related tags
Dynatrace PlatformDynatrace SignetDynatrace Platform Subscription