tdx observability#

Read inference traces and calls, the store status and its switch.

Read the gateway's inference observability store: traces (trajectories with their calls and timeline) and individual calls with their attribution. The attribution filters (--key-id, --user-id, --workspace-id, --request-id, and --sessions where offered) apply only with user management on; a gateway without it ignores parameters it does not know, so the reply is then unfiltered by them. status reads the store's state (install-wide status.read); set saves the observability switch for the next restart (install-wide settings.manage).

Every command also takes the global flags and reads the environment variables that the command reference lists once.

Commands#

CommandDescriptionType
tdx observability tracesRead inference traces.Group
tdx observability traces listList traces, newest first.Read
tdx observability traces showRead one trace with its calls and timeline.Read
tdx observability callsRead individual gateway calls.Group
tdx observability calls listList calls, newest first.Read
tdx observability statusRead embedded observability store status.Read
tdx observability setSave the observability switch for the next restart.Write

tdx observability traces#

Read inference traces.

Read inference traces from the gateway's observability store: list a page, or show one trace without its captured text. The attribution filters (--key-id, --user-id, --workspace-id, --request-id, and --sessions where offered) apply only with user management on; a gateway without it ignores parameters it does not know, so the reply is then unfiltered by them.

tdx observability traces list#

List traces, newest first.

Reads

Read one gateway page of traces (trajectories) the gateway lets this credential see. No automatic paging: pass nextCursor back with the same filters. The attribution filters (--key-id, --user-id, --workspace-id, --request-id, and --sessions where offered) apply only with user management on; a gateway without it ignores parameters it does not know, so the reply is then unfiltered by them. A --key-id that is not a gateway key id (a ULID) is a secret request parameter: it prints as █, and so does any value that contains it or another &-separated part of the request path, such as model=<model> after an earlier filter. See Values too long to print. A nextCursor longer than 2048 characters (the gateway puts the last row's id in it) prints as [withheld: too long] while hasMore keeps the gateway's value; --cursor refuses the marker before any request, so page past that row with narrower --since and --until filters. keyHash is withheld; with amounts hidden for this reader costUsd is null. See Observability filters and output.

Shell
# GET /observability/v1/traces
tdx observability traces list [flags]

Optional flags

FlagTypeDefaultDescription
--sincedatetimeOnly items starting at or after this instant.
--untildatetimeOnly items starting at or before this instant.
--statusstringStatus, such as ok or error.
--providerstringProvider id, passed through as given.
--modelstringModel id, passed through as given.
--agentstringAgent name.
--projectstringProject id.
--tagstringTag.
--searchstringFree-text search the gateway matches.
--key-idstringAttribution: public API key id.
--user-idstringAttribution: public user id.
--workspace-idstringAttribution: public workspace id.
--request-idstringRequest id.
--sessionsone of grouped, sourcedGrouped or sourced sessions only.
--limitintegerPage size; the gateway clamps it to 1..200 and defaults to 50.
--cursorstringOpaque nextCursor from a previous observability traces list page with the same filters; pass it as --cursor=<nextCursor>.

Output fields (inside data)

FieldTypeDescription
tracespublic-trace[]Id, trace id, title, status, agent, project, endpoint, providers, key label, tags, times, counts, session source, client trajectory id, input, output, non-cached input, cached input, cache-creation input, reasoning output and total tokens, costUsd.
summarytrace-summaryTrajectories, error trajectories, spans, unpriced calls (null when absent), input, output, non-cached input, cached input, cache-creation input, reasoning output and total tokens and costUsd over the whole filtered scope.
money'raw'|'hidden'|nullHow amounts read for this credential; null when the gateway does not say.
hasMorebooleanWhether a further page exists.
nextCursorstring|nullGateway continuation cursor; null on the final page.

tdx observability traces show#

Read one trace with its calls and timeline.

Reads

Read one trace. Trace ids can be client-chosen, so the id is percent-encoded into the path. Captured text (span request and response, error messages and event data) is never printed: textWithheld says whether the reply carried any; it still feeds masking. keyHash is withheld. See Values too long to print and Observability filters and output.

Shell
# GET /observability/v1/traces/:id
tdx observability traces show --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringTrace id as the gateway reported it: 1-512 printable ASCII characters without whitespace; never a credential.

Output fields (inside data)

FieldTypeDescription
tracepublic-trace-detailThe trace summary fields, captureText, calls (structured fields only) and events (id, request id, time, stage, provider, model).
textWithheldbooleanWhether the reply carried captured text the CLI did not print.

tdx observability calls#

Read individual gateway calls.

Read individual calls (provider calls and gateway request outcomes) with attribution. Requires a gateway with user management on.

tdx observability calls list#

List calls, newest first.

Reads

Read one gateway page of calls with their attribution and usage. The route exists only with user management on; without it the gateway answers 404 and this exits 5 NOT_FOUND. JSON only: the gateway's CSV export (format=csv) is not offered. The attribution filters (--key-id, --user-id, --workspace-id, --request-id, and --sessions where offered) apply only with user management on; a gateway without it ignores parameters it does not know, so the reply is then unfiltered by them. A --key-id that is not a gateway key id (a ULID) is a secret request parameter: it prints as █, and so does any value that contains it or another &-separated part of the request path, such as model=<model> after an earlier filter. See Values too long to print. A nextCursor longer than 2048 characters (the gateway puts the last row's id in it) prints as [withheld: too long] while hasMore keeps the gateway's value; --cursor refuses the marker before any request, so page past that row with narrower --since and --until filters. Directory entries name the keys, people and workspaces the page refers to, as arrays of id, name and state. Gateway key ids (ULIDs) print in clear, in calls and in the directory, as do the directory's key names and states. If any directory key id is not a ULID, every key name and state there of 8 or more characters prints as █ wherever it appears; under an id that contains a secret-like word such as KEY, that entry's name and state of 8 or more characters print as █ wherever they appear. See Observability filters and output.

Shell
# GET /observability/v1/calls
tdx observability calls list [flags]

Optional flags

FlagTypeDefaultDescription
--kindone of provider_call, gateway_request_outcome, allProvider_call, gateway_request_outcome or all; omitted uses the gateway default (all).
--sincedatetimeOnly items starting at or after this instant.
--untildatetimeOnly items starting at or before this instant.
--statusstringStatus, such as ok or error.
--providerstringProvider id, passed through as given.
--modelstringModel id, passed through as given.
--agentstringAgent name.
--projectstringProject id.
--tagstringTag.
--searchstringFree-text search the gateway matches.
--key-idstringAttribution: public API key id.
--user-idstringAttribution: public user id.
--workspace-idstringAttribution: public workspace id.
--request-idstringRequest id.
--limitintegerPage size; the gateway clamps it to 1..200 and defaults to 50.
--cursorstringOpaque nextCursor from a previous observability calls list page with the same filters; pass it as --cursor=<nextCursor>.

Output fields (inside data)

FieldTypeDescription
callspublic-call[]Id, kind, status, structured error, trajectory id, times, endpoint, provider, model, finish reason, tags, key/user/workspace ids, principal kind, input, output, non-cached input, cached input, cache-creation input, reasoning output and total tokens, costUsd, usageReported, costReported.
summarycall-summaryCalls, coverage, input, output, non-cached input, cached input, cache-creation input, reasoning output and total tokens, costUsd and refused (null when absent) over the whole filtered scope.
money'raw'|'hidden'|nullHow amounts read for this credential.
directorypublic-directoryKeys, users and workspaces: arrays of id, name and state.
hasMorebooleanWhether a further page exists.
nextCursorstring|nullGateway continuation cursor; null on the final page.

tdx observability status#

Read embedded observability store status.

Reads

Requires install-wide status.read. Reads GET /observability/v1/status: the store state, whether the embedded store is live in this process (enabled), the resolved switch it will use at the next start (configEnabled; null when the gateway omits it for a live store), text capture, trace and span counts, retention and ingest health. Every printed value comes from one fail-closed masking pass over the request, the whole gateway reply (including fields the CLI drops) and the CLI's projection, before selection/jq; █ marks masked values. state is printed as the CLI's own validated literal. A reply that cannot be masked within the fixed limits fails with OUTPUT_MASK_LIMIT (exit 7) and no values; a malformed reply fails with INVALID_RESPONSE (exit 7). --dry-run still performs this read.

Shell
# GET /observability/v1/status
tdx observability status [flags]

Output fields (inside data)

FieldTypeDescription
statestringStore state: ok, degraded or disabled.
enabledbooleanWhether the embedded store is live in this gateway process.
configEnabledboolean|nullWhile disabled: the resolved switch for the next start; null when a running store omits it.
captureTextbooleanWhether raw text capture is on.
tracesintegerStored traces.
spansintegerStored spans.
oldestStartedAtstring|nullOldest stored trace start.
newestStartedAtstring|nullNewest stored trace start.
storageBytesinteger|nullStore size in bytes, when known.
retentionstore-retentionMaximum age, bytes and traces, and last prune time.
ingeststore-ingestQueue depth and capacity, dropped events, degraded flag and last error time.

Examples

Read the masked public projection as versioned JSON:

Shell
tdx observability status --json

Select declared output fields:

Shell
tdx observability status --json=state,enabled,configEnabled

See also: tdx observability set, tdx audit status

tdx observability set#

Save the observability switch for the next restart.

Writes

Requires install-wide settings.manage. Sends PUT /control/observability with body exactly {"enabled": <boolean>}. The gateway persists the saved switch and returns it. It applies at the gateway's next restart unless TOKEDEX_OBSERVABILITY (or its alias TOKEDEX_OBSERVABILITY_STORE) is set there, which overrides it. While the store is disabled, observability status shows the resolved next-start value as configEnabled; a running store does not report it. Dry-run reads no saved profile, sends no request and creates nothing; it requires no credential source, and TOKEDEX_TOKEN, when set, is used only to mask the preview. The gateway has not checked its preview. Before sending, the request is masked alone; if that hits the fixed limits the command fails with OUTPUT_MASK_LIMIT (exit 7) and nothing is sent. The printed value comes from one fail-closed masking pass over the request, the whole gateway reply and the projection; an accepted write whose reply is invalid or cannot be masked fails with CHANGE_APPLIED_RESPONSE_INVALID (exit 1) and no values.

Shell
# PUT /control/observability
tdx observability set --enabled <true|false> [flags]

Required flags

FlagTypeDefaultDescription
--enabledone of true, falseSave observability on (true) or off (false).

Output fields (inside data)

FieldTypeDescription
enabledbooleanThe switch the gateway persisted.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Save observability on for the next restart:

Shell
tdx observability set --enabled true --json

Preview turning it off without any read or request:

Shell
tdx observability set --enabled false --dry-run --json

See also: tdx observability status