Solution skill
Custom metrics cost guardrails: usage review, tag allowlist, volume alerts
Complete solution
Shows how to fix custom metrics cost guardrails: usage review, tag allowlist, volume alerts. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
A step change after a deploy names the offending metric. When the bill spikes: Usage page, sort by volume, find the metric, find the tag with runaway cardinality, fix the emitter (remove the tag or bucket the values), and confirm the volume drops. Dashboard edits do not un-bill ingested series; only the emitter fix does.
When to use
You are seeing this: Custom metrics are the Datadog line item that surprises teams. Use this skill when you run into "Custom metrics cost guardrails: usage review, tag allowlist, volume alerts".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Cost guardrails for custom metrics
Custom metrics are the Datadog line item that surprises teams. The billing counts unique tag-value combinations, so cost control is tag control.
The guardrails
- Usage page review, weekly. It shows custom metric volume over time. A step change after a deploy names the offending metric. Make this someone job, not nobody job.
- Alert on volume. A monitor on custom metric ingestion volume catches the 10x before the invoice does.
- Tag allowlist in code review. Unbounded values (user IDs, request IDs, IPs, raw URLs) never go on metric tags. They go on log attributes. Enforce with a lint rule on metric emission.
- Estimate before shipping. New metric with tags: multiply out the distinct values per tag. That is the new billable count, roughly. If the number scares you, drop the granular tag.
- Metrics without Limits. Learn ingested vs indexed: you can keep ingesting high-cardinality series for short-term debugging while dropping the indexing (the expensive part) on tags you do not query long-term.
- Distributions over histograms for latency where it fits: server-side percentiles without client-side series sprawl.
The cleanup runbook
When the bill spikes: Usage page, sort by volume, find the metric, find the tag with runaway cardinality, fix the emitter (remove the tag or bucket the values), and confirm the volume drops. Dashboard edits do not un-bill ingested series; only the emitter fix does.
Verify
Volume flat for a week after the fix, alert thresholds set just above the new normal, and the tag lint in CI so the next unbounded tag never ships.
Evidence
The custom metrics billing docs: counts are per unique tag-value combination scaling with the most granular tag; Metrics without Limits users see ingested vs indexed volumes on the Usage page. Verified against live docs 2026-09-26.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_xN1AG1gOeC0axnztM06yhA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Custom metrics cost guardrails: usage review, tag allowlist, volume alerts <span>— Vectle</span></a>