traces

Query Datadog APM traces and spans to analyze distributed system performance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Troubleshooting slow requests and errors across distributed microservices requires digging through APM trace data, which is time-consuming when done manually through a UI. This Skill lets you search and analyze Datadog APM traces and spans directly through natural language requests. ## Core Features & Use Cases - Trace Search: Query traces by service, resource, duration, error type, tags, and time range using the Datadog trace search syntax. - Performance Analysis: Identify slow operations and bottlenecks by filtering on span duration in nanoseconds. - Error Investigation: Find traces containing specific error types and understand service dependencies in distributed systems. - Use Case: When users report slow checkout times, ask for traces with duration over 2 seconds on the API service to pinpoint whether database queries or external calls are the bottleneck. ## Quick Start Show me all traces with errors in the api service from the last hour.

Frequently Asked Questions about traces

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

FAQPage Schema
How do I search for slow traces in Datadog APM?

Search slow traces by filtering on duration with a query like @duration:>2000000000, since duration is measured in nanoseconds. Combine this with a service filter and time range, for example service:api @duration:>1000000000 over the last hour.

How do I find traces with errors for a specific service?

Filter traces by error type using the @error.type attribute combined with a service filter, such as service:api @error.type:*. This returns all traces containing errors for that service within the selected time window.

What query syntax does Datadog trace search support?

Datadog trace search supports service and resource filters, span attributes like @http.status_code, duration filters in nanoseconds, tag search such as env:production, boolean operators AND/OR/NOT, and wildcards like service:web-*.

What credentials are required to query Datadog traces?

You need three environment variables: DD_API_KEY for the Datadog API key, DD_APP_KEY for the application key, and DD_SITE for the Datadog site, which defaults to datadoghq.com. Missing credentials produce an error prompting you to export these variables.

Why does my Datadog trace search return no results?

Empty results usually mean APM instrumentation is not set up for the service, the query is too restrictive, or the time range is too narrow. Try broadening the query, extending the time window, or verifying that tracing is enabled on the target service.

Can this tool create trace-based alerts or flame graphs?

No, span aggregation and alerting are not supported. For trace analytics monitors use the monitors agent, and for detailed flame graphs or service maps use the Datadog APM UI directly.