Search Service Traces
searchServiceTracesSearch service traces to inspect requests by method, route, and status, returning sample durations, request counts, median, and 95th-percentile latency for a selected time range.
Instructions
Returns a sample of the requests the service handled in the range, one per trace, with their method, route, status and duration, plus the range's request count and median and 95th-percentile duration. Filter on route, method and status (2xx to 5xx, or a code). Needs tracing on for the app and an OpenTelemetry SDK in the service; traces are kept for 7 days. serviceName is a compose service.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspaceSlug": "<workspaceSlug>",
"appSlug": "<appSlug>",
"serviceName": "<serviceName>"
},
"name": "searchServiceTraces"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| sort | No | `recent` lists the newest traces; `slowest` adds the range's traces above its 95th percentile and lists the slowest first; `errors` adds the range's failed traces and lists them first | recent |
| range | No | How far back to look; the answer has 30 to 96 points across it | 1h |
| filter | No | Filters, each written `<field><op><value>` with op `=`, `!=`, `=~` or `!~`; `=~` and `!~` take a regular expression matched against the whole value, ignoring case. Repeat the parameter for several; every one must hold | |
| region | No | ||
| appSlug | Yes | ||
| serviceName | Yes | ||
| workspaceSlug | Yes |