Dd Audit Cost Spike Investigation
DatadogOfficialCreated by datadog-labs
- Skill
- Research and analysis
- Cloud and DevOps
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for identifying the root cause of unexpected Datadog usage or cost spikes. By correlating Usage Metering data with Audit Trail logs, users can pinpoint configuration changes that occurred immediately preceding a spike. The process involves identifying the specific product family and timeframe of the spike, then querying audit logs for relevant modifications to resources like pipelines, retention filters, or sampling rates.
What it does
- Retrieves hourly usage data to identify specific product families and timeframes of spikes.
- Searches Audit Trail logs for configuration changes occurring in the 24 hours prior to a spike.
- Filters audit logs based on product-specific categories like APM, Log Management, or RUM.
- Provides a standardized output format to summarize findings and identify likely causal changes.
- Offers troubleshooting steps for when no immediate causal change is identified.
When to use it
- When you notice an unexpected increase in Datadog billing or product usage metrics.
- When you need to determine if a recent configuration change caused a spike in data volume.
- When investigating which user or process modified settings that impacted resource consumption.
- When performing FinOps activities to audit and control cloud monitoring costs.
Advantages
- Connects billing anomalies directly to administrative actions.
- Reduces mean time to resolution for cost-related incidents.
- Provides a clear, repeatable investigative framework.
- Helps distinguish between intentional configuration changes and unexpected traffic growth.
Usage examples
- “Investigate why my Datadog LLM Observability costs spiked yesterday.”
- The agent will query the Usage Metering API to confirm the spike, then search Audit Trail logs for relevant integration or APM changes in the preceding 24 hours to identify potential causes.
- “Find out who changed our log retention filters before the usage spike at 14:00 UTC.”
- The agent will execute an audit log search filtered by Log Management and retention-related asset types to identify the user and the specific change made before the spike.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/datadog-labs/dd-audit-cost-spike-investigation/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip dd-audit-cost-spike-investigation.zip -d .agents/skills
Documentation by datadog-labs
Audit Trail: Cost / Usage Spike Investigation
Identify what caused a Datadog usage spike by correlating billing data with configuration change history.
The causal chain is: someone changed something → that change increased data volume → usage spiked → cost went up. Usage Metering tells you when and what; Audit Trail tells you who made the change.
Prerequisites
pup auth login # OAuth2 (recommended) — covers audit queries
# Usage Metering queries also need DD_API_KEY + DD_APP_KEY
export DD_API_KEY=<your-api-key>
export DD_APP_KEY=<your-app-key>
export DD_SITE=datadoghq.comScope Boundary
This skill identifies configuration changes that may have caused a spike. It does not identify which specific user or process submitted the data (e.g., which service sent the LLM spans). For per-submission attribution, use LLM Observability traces or APM instrumentation.
Investigation Workflow
Step 1 — Identify the spike window and product family
START=$(date -u -v-7d +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -d "7 days ago" +"%Y-%m-%dT%H:%M:%SZ")
END=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
curl -s -G "https://api.${DD_SITE}/api/v2/usage/hourly_usage" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
--data-urlencode "filter[timestamp][start]=${START}" \
--data-urlencode "filter[timestamp][end]=${END}" \
--data-urlencode "filter[product_families]=all" \
| jq '[.data[] | {
timestamp: .attributes.timestamp,
product: .attributes.product_family,
measurements: [.attributes.measurements[] | {type: .usage_type, value: .value}]
}]'Product families with LLM/AI coverage: llm_observability, bits_ai, logs, apm
Step 2 — Pinpoint the spike
From Step 1, identify the hour/day where volume jumped. Note the timestamp as SPIKE_TIME.
Step 3 — Search Audit Trail for config changes in the 24h preceding the spike
pup audit-logs search \
--query "@action:(created OR modified OR deleted)" \
--from "SPIKE_TIME_MINUS_24H" \
--to "SPIKE_TIME" \
--limit 200 \
-o json \
| jq '[.data[] | {
timestamp: .attributes.timestamp,
user: .attributes.attributes.usr.email,
actor_type: .attributes.attributes.evt.actor.type,
action: .attributes.attributes.action,
event_category: .attributes.attributes.evt.name,
resource_type: .attributes.attributes.asset.type,
resource_id: .attributes.attributes.asset.id
}]'Note:
--fromand--toaccept ISO timestamps (e.g.,2026-05-01T14:00:00Z) or relative values (1h,24h,7d).
Step 4 — Narrow to product-relevant config changes
Filter to the audit categories most likely to affect the spiking product:
| If this product spiked | Add to query |
|---|---|
llm_observability | @evt.name:(Integration OR APM OR "Log Management") |
logs / indexed_logs | @evt.name:"Log Management" @asset.type:(pipeline OR index OR exclusion_filter) |
apm / indexed_spans | @evt.name:APM @asset.type:(retention_filter OR sampling_rate) |
rum | @evt.name:RUM |
metrics | @evt.name:Metrics |
Example for LLM Observability spike:
pup audit-logs search \
--query "@evt.name:(Integration OR APM OR \"Log Management\") @action:(created OR modified)" \
--from "SPIKE_TIME_MINUS_24H" \
--to "SPIKE_TIME" \
--limit 100 \
-o json \
| jq '[.data[] | {
timestamp: .attributes.timestamp,
user: .attributes.attributes.usr.email,
action: .attributes.attributes.action,
category: .attributes.attributes.evt.name,
resource_type: .attributes.attributes.asset.type,
resource_id: .attributes.attributes.asset.id
}]'Output Format
Usage spike detected:
Product: <product_family>
Spike time: <SPIKE_TIME>
Volume: <baseline> → <spike_value> (<magnitude>×)
Configuration changes in 24h preceding spike:
<timestamp> | <user_email> | <action> <resource_type> <resource_id> | <category>
Likely causal change: <most-proximate change matching the product family>
Confidence: HIGH (single clear change) / MEDIUM (multiple candidates) / LOW (no matching changes)
Next steps:
- Confirm with <user_email> whether the change was intentional
- If unintentional: revert <resource_id> and monitor volume
- If intentional: update cost forecasts and alert thresholdsWhen No Causal Change Is Found
The change may predate the 24h window — expand to 72h
The increase may be from application-side instrumentation changes — check deploys
The increase may be organic traffic growth — correlate with product launch or traffic event
References
Files
- ATTRIBUTION.mdAdded by AutoGineer998 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md5.3 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "dd-audit-cost-spike-investigation", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: 8e1306ada01e08bfd16ce342ff83e9334d455a15
Created by: datadog-labs (https://github.com/datadog-labs/agent-skills/tree/8e1306ada01e08bfd16ce342ff83e9334d455a15/dd-audit/cost-spike-investigation)
Publisher: Datadog (https://github.com/datadog-labs)
Licence: MIT License (https://github.com/datadog-labs/agent-skills/blob/8e1306ada01e08bfd16ce342ff83e9334d455a15/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs network access, Needs an API key
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- datadog-labs
- Publisher
- Datadog (Official)
- Source
- datadog-labs/agent-skills · dd-audit/cost-spike-investigation · commit 8e1306a
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by datadog-labs or Datadog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download dd-audit-cost-spike-investigation.zip