Obtain a Datadog API key from Organization Settings > API Keys in the Datadog UI
POST to 'https://api.datadoghq.com/api/v2/series' (v2 metrics intake) with Content-Type: application/json and the DD-API-KEY header set to YOUR_API_KEY
Construct the request body as '{"series": [{"metric": "your.metric.name", "type": 1, "points": [{"timestamp": <unix_epoch>, "value": <float>}], "tags": ["env:prod"]}]}' where type 1 = count, 3 = gauge
Alternatively use the Datadog Agent's DogStatsD UDP interface on port 8125 by sending 'metric.name:value|g|#tag:value' datagrams for lower-latency ingestion
Verify ingestion in Metrics Explorer by searching the metric name; allow up to a few minutes for first appearance
Known gotchas
Custom metric billing is based on the number of unique tag value combinations (time series); high-cardinality tags like user IDs can cause unexpected cost spikes
The v1 metrics endpoint (/api/v1/series) uses 'gauge', 'count', 'rate' strings for type; the v2 endpoint uses integers — mixing them causes validation errors
Timestamps must be within a few hours of current time; metrics with timestamps outside the ingestion window are silently dropped without error responses
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp