Once you've configured Cost Allocation tags (see Set up Cost Allocation), use this page to read and export the data.
To analyze Cost Allocation data, you can:
Cost Allocation data is written to Grail as billing usage events with dt.cost.costcenter and dt.cost.product attributes. You can analyze it inside Dynatrace with the pre-made dashboard or custom DQL, or export it for finance-team reporting in tools like Excel or Power BI.
Cost Allocation data is stored in Dynatrace Grail as billing usage events. These events can be analyzed:
Dashboards and
Notebooks.
Dynatrace provides a built-in Dashboard, DPS Cost Allocation usage & costs.
Examples from this dashboard are provided below.Visit the Dynatrace DPS Cost Allocation community to see how other Dynatracers analyze their Cost Allocation data.
To analyze Cost Allocation data you can use the Dynatrace pre-made dashboard.
The dashboard is available:
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.
This section provides various DQL queries that you can use to achieve specific use cases.
fetch dt.system.events| filter event.kind == "BILLING_USAGE_EVENT"
fetch dt.system.events| filter event.kind == "BILLING_USAGE_EVENT"| fieldsKeep event.type, dt.entitiy.host, dt.cost.costcenter, dt.cost.product
fetch dt.system.events| filter event.kind == "BILLING_USAGE_EVENT"| summarize count = count(), by:{event.type,dt.cost.costcenter}
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.
In Account Management, you can download some or all Cost Allocation data from your current DPS subscription.
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"}
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.
Infrastructure & Operations also in the allow list?Did you perform a restart? When in doubt, restart OneAgent or your Kubernetes pod(s). Then wait up to 30 minutes and try again.