errors:read.
Find a log with a trace ID
Search the error logs of a service in a bounded window. Each log has its trace ID intags.trace_id.
- CLI
- MCP
- REST API
level:error service:api field syntax to filter in
the text instead of with flags. See Logs search syntax.data, total, limit, offset, from, and to. Each log has this shape:
Read the logs of the trace
- CLI
- MCP
- REST API
{ "data": [log], "total": 11 } with logs in the shape above. The
query.run statement returns rows, columns, scanned_rows, scanned_bytes, and duration_ms.
Replace the 1 hour window with one that covers the time of your trace. The API reads logs from the
last 30 days.
Read the trace
- CLI
- MCP
- REST API
--json, traces get prints a waterfall of the spans. traces errors lists the
issues that the trace raised.root_span_name, service_name, duration_ms, span_count, and spans. Each span
has name, parent_span_id, duration_ms, attributes, resource_attributes, events, and
links.
Next steps
Logs API
Search syntax, filters, and pagination.
Query guide and safe SQL
Run bounded read-only SQL over logs, spans, and metrics.