datadog

datadog is a command for coding agents from jjmartres/ai-coding-agents. It costs 8 tokens per session (2,123 once invoked), scanned A, original, MIT.

A quick reference for Datadog, a service that collects application logs, metrics, errors, and traces for monitoring software.

In plain words
What is it for?
Use it to search, filter, group, stream, and compare logs; query time-based metrics; inspect errors; and find services with recent log activity.
Why use it?
It avoids having to remember the command names and query formats for finding problems or examining service activity.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jjmartres/ai-coding-agents/datadog
Clone the repo
git clone --depth 1 https://github.com/jjmartres/ai-coding-agents

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for datadog

README.md
[![agentmods](https://agentmods.dev/badge/commands/jjmartres/ai-coding-agents/datadog.svg)](https://agentmods.dev/commands/jjmartres/ai-coding-agents/datadog)
Your own site
<a href="https://agentmods.dev/commands/jjmartres/ai-coding-agents/datadog"><img src="https://agentmods.dev/badge/commands/jjmartres/ai-coding-agents/datadog.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.02123
Opus 5 $0.00004 $0.01061
Sonnet 5 $0.00002 $0.00425
Haiku 4.5 $0.00001 $0.00212

Measured 4d ago against content hash bc2e071bff01, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

datadog scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

shared/.ai-agents/commands/datadog.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Datadog CLI Quick Reference

Commands Overview

Command Purpose
logs search Search and filter logs
logs agg Aggregate logs by facet
logs tail Stream logs in real-time
logs trace Find logs for a trace ID
logs context Get logs around a timestamp
logs patterns Group similar log messages
logs compare Compare current vs previous period
logs multi Run multiple queries in parallel
metrics query Query timeseries metrics
errors Quick error summary
services List services with log activity
datadog logs search --query "<query>" --from <time> [--limit <n>] [--pretty]

Examples:

# All errors in last hour
datadog logs search --query "status:error" --from 1h --pretty

# Errors for a specific service
datadog logs search --query "service:api status:error" --from 1h --pretty

# HTTP 500 errors
datadog logs search --query "@http.status_code:500" --from 30m --pretty

# Errors containing specific text
datadog logs search --query "status:error connection refused" --from 1h --pretty

# Exclude certain services
datadog logs search --query "status:error -service:healthcheck" --from 1h --pretty

Log Aggregation

datadog logs agg --query "<query>" --facet <facet> --from <time> [--pretty]

Common facets: status, service, host, @http.status_code, @error.kind, @http.method

Examples:

# Count logs by status level
datadog logs agg --query "*" --facet status --from 1h --pretty

# Errors by service
datadog logs agg --query "status:error" --facet service --from 24h --pretty

# Requests by HTTP status code
datadog logs agg --query "service:api" --facet @http.status_code --from 1h --pretty

# Errors by error type
datadog logs agg --query "status:error" --facet @error.kind --from 6h --pretty

Live Tail (Real-time)

datadog logs tail --query "<query>" [--interval <seconds>] [--pretty]

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 293 lines · 8 tokens per session scan A bc2e071bff01

Subscribe to this mod's changes

datadog is a command published in the GitHub repository jjmartres/ai-coding-agents (44 stars, last pushed 2mo ago), licensed MIT. It adds 8 tokens to every session and 2,123 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.