- Overview
- Get started
- Concepts
- Using UiPath CLI
- How-to guides
- CI/CD recipes
- Command reference
- Overview
- Exit codes
- Global options
- uip codedagent
- uip docsai
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- create-project
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-workflow-examples
- pack
- restore
- run-file
- search-templates
- start-studio
- stop-execution
- uia
- uip traces
- Migration
- Reference & support
UiPath CLI user guide
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 byuip 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-keyprovided:FailurewithInstructions: "Provide either a trace-id argument or --job-key option", exit 1. --job-keypoints at an unknown or trace-less job:Failure: "Error retrieving trace ID for job"with the backend error message inInstructions.- Trace exists but spans cannot be fetched:
Failure: "Error retrieving spans for trace".
Related
- Tools (plugins) — install, update, uninstall the
traces-toolpackage. uip login— session used for both the job lookup and the span fetch.uip insights— job execution metrics; orthogonal to trace data.