Skip to main content

Get

Show the span tree of a trace.

Shows each span of a trace as a tree: the request on the controller, the job, each agent that ran it with its host and status, and the commands and file changes under each. The NATS calls, which record the job's progress, are left out and counted; --all shows them. Each command prints the ID of its trace after its job ID.

The controller reads the trace from the tracing backend at telemetry.tracing.url, so this host needs no access to the backend. The backend gets the spans a few seconds after the request: a trace that is not found yet is there after a few seconds.

osapi client telemetry trace get [flags]

Examples​

osapi client telemetry trace get --id 26e448c9dbe1c4a8d216a98c675079c9
osapi client telemetry trace get --id 26e448c9dbe1c4a8d216a98c675079c9 --all
osapi client telemetry trace get --id 26e448c9dbe1c4a8d216a98c675079c9 --json

Permission​

It needs the trace:read permission. osapi token roles get --name <role> shows what a role grants.

Flags​

FlagDescriptionDefault
--allShow the NATS calls too, the reads and writes of the job queue
--idThe trace ID, which a command prints after its job ID, 32 hexadecimal characters (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file/etc/osapi/osapi.yaml
--urlURL the client will connect tohttp://0.0.0.0:8080

Output tells how the result is printed, and what --json gives.