# rpk ai trace span get

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [agentic-data-plane-full.txt](https://docs.redpanda.com/agentic-data-plane-full.txt)

---
title: rpk ai trace span get
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.117.0
latest-redpanda-tag: v26.2.6
docname: rpk/rpk-ai/rpk-ai-trace-span-get
page-component-name: agentic-data-plane
page-version: master
page-component-version: master
page-component-title: Agentic Data Plane
page-relative-src-path: rpk/rpk-ai/rpk-ai-trace-span-get.adoc
page-edit-url: https://github.com/redpanda-data/adp-docs/edit/main/modules/reference/pages/rpk/rpk-ai/rpk-ai-trace-span-get.adoc
description: "Print one span of a trace: its timing, tokens, policy decisions and error, then its content. A model call shows its system prompt, last user message and reply; a tool call shows its arguments and result."
page-git-created-date: "2026-10-30"
page-git-modified-date: "2026-10-30"
page-generated-sources:
  - include: streaming:reference:partial$rpk-ai/rpk-ai-trace-span-get.adoc
    generator: rpk-docs
    version: null
    source: the rpk command help in redpanda-data/streaming-enterprise
page-generated-content: partial
---

<!-- Source: https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-trace-span-get.md -->

Print one span of a trace: its timing, tokens, policy decisions and error, then its content. A model call shows its system prompt, last user message and reply; a tool call shows its arguments and result.

Span ids come from `trace span list --ids`. A span you may not read shows only its timing and usage. `-o json` and `-o yaml` print the TraceSpan.

> 📝 **NOTE**
>
> This command was introduced in ai version 0.2.100.

## [](#usage)Usage

```bash
rpk ai trace span get <trace> <span-id> [flags]
```

## [](#examples)Examples

This section provides examples of how to use `rpk ai trace span get`.

```bash
rpk ai trace span get 4623d104a1415a48987e2659e9a9131b b25d357c25648b20
rpk ai trace span get 4623d104a1415a48987e2659e9a9131b b25d357c25648b20 -o json | jq -r .tool_result
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --start-time | string | the trace’s start time (RFC 3339), so the server can skip older history. |

## [](#global-flags)Global flags

| Value | Type | Description |
| --- | --- | --- |
| --config | string | Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings; -X help for detail or -X list for terser detail. |
| --ignore-profile | bool | Ignore rpk.yaml and redpanda.yaml; use default settings. |
| --profile | string | rpk profile to use. |
| -v, --verbose | bool | Enable verbose logging. |