UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Last updated May 7, 2026

uip traces

uip traces fetches LLM Observability spans for UiPath jobs — the OpenTelemetry-style traces emitted by coded agents and other AI-backed workflows. Use it to pull a full trace for an Orchestrator job so you can inspect prompts, tool calls, and response times from the shell or a CI pipeline.

See Tools (plugins) for how this tool integrates with the CLI.

Synopsis

uip traces spans get [<trace-id>] [--job-key <guid>]
                     [-t <tenant>]
                     [--folder-path <path>] [--folder-key <guid>]
uip traces spans get [<trace-id>] [--job-key <guid>]
                     [-t <tenant>]
                     [--folder-path <path>] [--folder-key <guid>]

All subcommands honor the global options and exit codes.

uip traces spans get

Return all spans for a trace. You can address the trace directly by its ID, or indirectly by the Orchestrator job key — the tool resolves the job's trace ID for you.

Arguments:

  • [trace-id] (optional) — Trace ID in 32-character hex or GUID format.

Options:

  • --job-key <guid> — Orchestrator job key. Alternative to <trace-id>; the tool fetches the job's metadata and extracts its trace ID.
  • -t, --tenant <name> — Tenant. Defaults to the tenant selected by uip login.
  • --folder-path <path> — Orchestrator folder path (used when resolving the job).
  • --folder-key <guid> — Orchestrator folder key (used when resolving the job).

Exactly one of <trace-id> or --job-key must be supplied. Omitting both fails with Failure: "Missing required argument".

Examples:

# By trace ID
uip traces spans get 4bf92f3577b34da6a3ce929d0e0e4736

# By job key — the tool resolves the trace ID first
uip traces spans get --job-key a1b2c3d4-0000-0000-0000-000000000001

# By job key within a specific folder
uip traces spans get --job-key a1b2c3d4-0000-0000-0000-000000000001 \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001
# By trace ID
uip traces spans get 4bf92f3577b34da6a3ce929d0e0e4736

# By job key — the tool resolves the trace ID first
uip traces spans get --job-key a1b2c3d4-0000-0000-0000-000000000001

# By job key within a specific folder
uip traces spans get --job-key a1b2c3d4-0000-0000-0000-000000000001 \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001

Data shape (--output json):

{
  "Code": "TraceSpans",
  "Data": [
    {
      "spanId": "00f067aa0ba902b7",
      "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
      "name": "llm.completion",
      "startTime": "2025-04-15T10:30:00.123Z",
      "endTime": "2025-04-15T10:30:01.456Z"
    }
  ]
}
{
  "Code": "TraceSpans",
  "Data": [
    {
      "spanId": "00f067aa0ba902b7",
      "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
      "name": "llm.completion",
      "startTime": "2025-04-15T10:30:00.123Z",
      "endTime": "2025-04-15T10:30:01.456Z"
    }
  ]
}

The Data array contains one object per span, in the order the backend returns them. The exact span fields (attributes, events, parent/child links) depend on what the emitting runtime captured — the CLI does not normalize them.

Error behavior

  • Neither <trace-id> nor --job-key provided: Failure with Instructions: "Provide either a trace-id argument or --job-key option", exit 1.
  • --job-key points at an unknown or trace-less job: Failure: "Error retrieving trace ID for job" with the backend error message in Instructions.
  • Trace exists but spans cannot be fetched: Failure: "Error retrieving spans for trace".
  • Tools (plugins) — install, update, uninstall the traces-tool package.
  • uip login — session used for both the job lookup and the span fetch.
  • uip insights — job execution metrics; orthogonal to trace data.
  • Synopsis
  • uip traces spans get
  • Error behavior
  • Related

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated