dd-logs

Search, process, and archive Datadog logs with cost-control filters.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill dd-logs-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-logs
Source: https://github.com/lauhon/pi/tree/main/skills/dd-logs
Command: npx skills add https://github.com/lauhon/pi --skill dd-logs-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing logs at scale in Datadog is expensive and complex: noisy sources inflate indexing costs, search syntax is easy to get wrong, and trace IDs can mysteriously disappear from API results. This Skill provides tested commands and configurations for searching logs, building pipelines, controlling costs, and archiving data. ## Core Features & Use Cases - Log Search: Query logs with the Datadog search syntax (tags, attributes, numeric ranges, wildcards) via the pup CLI, with JSON output by default. - Pipelines & Processing: Create observability pipelines with grok parsers, status remappers, and attribute remappers to structure logs before indexing. - Cost Control: Configure exclusion filters to drop debug logs, health checks, and static assets, and identify the noisiest log sources. - Archives & Compliance: Store logs cheaply in S3 with rehydration tags, and scrub sensitive data like emails, credit cards, and SSNs. - Use Case: Your Datadog bill spiked. Use this Skill to find the top 10 noisiest services, add exclusion filters for health checks and debug logs, and archive the rest to S3 for compliance. ## Quick Start Ask the AI to search Datadog logs for errors in the api service from the last hour using the pup CLI.

Frequently Asked Questions about dd-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Datadog logs from the command line?

Use the pup CLI with pup logs search, passing a query and time range, for example pup logs search --query="service:api status:error" --from="1h" --limit 100. Results are returned as JSON by default, and queries support tags, attributes, numeric ranges, and wildcards.

How do I reduce Datadog log indexing costs?

Add exclusion filters to your indexes so only valuable logs are indexed, such as dropping status:debug logs, health check endpoints, static assets, and heartbeat messages. First find the noisiest sources by grouping search results by service, then create filters targeting those patterns.

Why is dd.trace_id missing from Datadog log search API results?

When a trace ID attribute is remapped for trace correlation, Datadog stores it as an internal attribute that the Logs Search API does not return, even though the UI shows a trace link. This is expected behavior, not a bug; emit the trace ID under a separate non-remapped attribute or search spans via pup traces search instead.

How do I create a Datadog log pipeline with a grok parser?

Define the pipeline as JSON with a filter query and a processors array containing a grok-parser with match_rules, plus optional status-remapper and attribute-remapper processors. Then create it with pup obs-pipelines create --file pipeline.json.

Can I archive Datadog logs to S3 for compliance?

Yes, configure a log archive with an S3 destination specifying the bucket and path, plus rehydration_tags so archived logs can be reloaded later. List existing archives with pup logs archives list.

How do I scrub sensitive data from logs before sending to Datadog?

Use a hash-remapper processor in your pipeline to hash fields like email addresses, and sanitize messages in application code with regex patterns that redact credit card numbers and SSNs before logging.