search_apm_traces
Debug slow requests and find errors by searching distributed traces and spans. Filter with Datadog APM syntax like service, status, or custom tags.
Instructions
Search distributed traces and spans for performance analysis (paginated).
Use this when: debugging slow requests, finding errors in services, or analyzing latency. For statistics (latency percentiles, error rates) without fetching raw spans, use aggregate_spans instead - it is much lighter for dashboards/analytics.
Common queries:
Find errors: "service:api @error.message:*"
By status: "service:checkout @http.status_code:500"
Custom tags: "@airline_name:aeromexico @session_id:*"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | "timestamp" or "-timestamp" | timestamp |
| query | Yes | Search query using Datadog APM span search syntax (examples above) | |
| cursor | No | Pagination cursor from a previous response | |
| to_time | Yes | End time - same accepted formats as from_time | |
| from_time | Yes | Start time - ISO 8601, relative date math (e.g. "now-1h"), or a millisecond timestamp | |
| page_size | No | Spans per page (default: 25, max: 50) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||