Skip to main content

scout traces

Query traces and spans for a specific service from the Scout platform. Filter by span name, status code, attributes, and time range.

scout traces demo

Usage

scout traces <SERVICE> [flags]

Arguments

ArgumentTypeDescription
SERVICEstring(required) Service name to query traces for

Flags

FlagTypeDefaultDescription
--spanstringFilter by span name. Repeatable (OR logic)
--statusstringFilter by status code. Repeatable. Values: Unset, Ok, Error (case-insensitive)
--attrKEY=VALUEFilter by span attribute. Repeatable (AND logic)
--resourceKEY=VALUEFilter by resource attribute. Repeatable (AND logic)
--sinceduration5mTime window (max: 15 minutes). Conflicts with --start
--startRFC 3339Start time. Conflicts with --since
--endRFC 3339End time. Requires --start
--limitinteger50Maximum number of results (max: 100)
--rawboolfalseOutput JSON
--discoverboolfalseShow available span metadata instead of querying
--idstringDrill into a specific trace by ID. Extends the time window to 60 minutes

Examples

Query recent traces:

scout traces payment-service

Filter by span name:

scout traces payment-service --span checkout --span payment

Filter by error status:

scout traces payment-service --status Error

Filter by attributes:

scout traces payment-service --attr user_id=123 --resource environment=prod

Drill into a specific trace:

scout traces payment-service --id abc123def456

Discover available span names and attributes:

scout traces payment-service --discover

Filtering Logic

  • --span — Multiple values use OR logic (matches any of the given span names)
  • --status — Multiple values use OR logic. Valid values: Unset, Ok, Error (case-insensitive)
  • --attr and --resource — Multiple values use AND logic (all conditions must match)
tip

Use --discover to see available span names, status codes, and attribute keys before building a targeted query.

note

When using --id to drill into a specific trace, the time window is automatically extended to 60 minutes to ensure the full trace is captured.

Time Ranges

MethodMax Window
--since15 minutes
--start / --end30 minutes
--id60 minutes

See Also

Was this page helpful?