Estimate how many billable Datadog custom metrics a sample produces, offline, before the bill arrives.
Datadog bills custom metrics per unique combination of metric name and tag values. One tag with many values, such as user_id, can raise the metric count and the bill, and a team usually sees that only afterwards.
dd-metric-bill shows beforehand, locally, which metric and which tag drives the count. It reads DogStatsD, JSON lines or Prometheus text.
$ dd-metric-bill count tests/fixtures/b1-count.dogstatsd total: 4 request.Latency type: count combinations: 4 count: 4 rule: D3 tag: endpoint values: 2 added: 1 tag: host values: 2 added: 1 tag: status values: 2 added: 1 estimate: Datadog bills the hourly average over the month; this is one snapshot (source: B1)
cargo install --locked dd-metric-bill