query_traces
Query distributed traces for a service over a given timeframe. Returns ranked trace summaries with duration, span count, error status, and p50/p95 aggregates.
Instructions
Query distributed traces for a service over a given timeframe. Returns ranked trace summaries (duration, span count, error status) with a p50/p95 aggregate across the returned set. When to use: investigate tail-latency outliers, walk call chains across services for a specific time window, or pull traces related to an anomaly that the metric/log tools surfaced first. Prerequisites: get the exact service name from list_services. A traces connector (e.g. Tempo, installable from the connector hub) must be configured — none is bundled by default, so without one this returns a clean 'No trace backends configured' result. Behavior: read-only. filter accepts the backend's native query language (e.g. TraceQL on Tempo). When errorsOnly=true, only traces with at least one error span are returned. Default limit is 50.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Service name (e.g. 'payment-service'). | |
| duration | No | Rolling time window, e.g. '5m', '1h'. Default '15m'. | |
| filter | No | Backend-native filter (TraceQL on Tempo, tag query on Jaeger). Optional. | |
| limit | No | Soft cap on returned trace summaries. Default 50. | |
| errorsOnly | No | If true, only traces with at least one error span. |