Driver metric split
The driver metric method distributes the cost in proportion to an operational metric — the driver — instead of a fixed percentage or the cost itself. For example, you can split a shared database bill by each team's share of database IOPS, or a shared network bill by bytes transferred per service.
Unlike the custom and proportional methods, the split is recalculated for each time bucket of the report: if a team's usage doubles halfway through the month, its share of the shared cost follows from that day on.
The driver metric method is an early access feature. To enable it for your organization, see Early access features.
Prerequisites
-
The driver metric must be available as a DataHub metric. You can ingest metric values with the DataHub API or sync them from Datadog.
-
The report must include DataHub data: in the report's Data source section, select the Include DataHub data checkbox.
-
The target items must be rules in a group allocation, and each rule must match the driver metric's data points — typically by adding a condition on the label that identifies the target (for example,
team). A rule that doesn't match any data points receives a zero share.
Split costs by a driver metric
-
In the Group by section, select the kebab menu (⋮) at the rightmost end of the group allocation, and then select Split cost.
-
Select the source item whose cost you want to split, for example, a
Shared Infrastructureallocation rule. -
Select the checkboxes of the target items.
-
Specify the distribution method as Driver metric, and then select the metric from the dropdown.
-
Select Split cost and run the report to view the results.
How the split is calculated
For each time bucket in the report (for example, each day), the cost distributed to a target item is calculated as:
Source_cost_in_bucket × (Target_driver_value_in_bucket / Sum_of_all_target_driver_values_in_bucket)
Keep in mind:
-
If none of the target items has driver data in a time bucket, the cost of that bucket remains on the source item.
-
Negative driver readings are ignored: they carry no signal about the target's share.
-
The report's filters and time range apply to the driver metric's data points too. If a filter excludes the DataHub events that carry the metric (for example, a filter on a dimension the events don't have), all driver values become zero and no cost is redistributed.
Sync driver metrics from Datadog
If your organization has a Datadog connection, you can sync Datadog metrics into DataHub on a daily schedule using metric exports:
-
Sign in to the DoiT console, select Data ingestion and integrations > Integrations from the top navigation mega menu.
-
Select Datadog, and then select Manage.
-
In the Metric exports section, select Add metric export and fill in:
-
Datadog organization: The organization whose credentials run the query. Shown only when more than one Datadog connection exists.
-
Metric key: Becomes the DataHub metric name; use lowercase letters, digits, and underscores (for example,
rds_iops_by_team). -
Datadog query: The full Datadog metrics query, including the tag group-bys (for example,
sum:aws.rds.total_iops{*} by {team}). Each group-by tag becomes a label on the ingested data points, which your allocation rules can match on. -
Daily rollup: How one day's datapoints collapse to a single value. Use
sumfor counters and throughput; useavgorlastfor gauges.
-
-
Select Test query to validate the query against Datadog, and then select Create.
The export syncs once a day and accumulates data from the day it's created — it doesn't backfill historical values. The metric appears in the report metric picker and in the Driver metric dropdown after the first sync completes.
Running metric queries requires the timeseries_query authorization scope on the application key of your Datadog connection. See Create a service account.