Read Span Content

Read a fragment of one span's content. The backend is queried for that span alone; items is empty when the trace has no such span. Continue fragments with version and next_offset.

GET/api/v1/traces/{trace_id}/spans/{span_id}/content

Read a fragment of one span's content. The backend is queried for that span alone; items is empty when the trace has no such span. Continue fragments with version and next_offset.

Authorization

AuthorizationBearer <token>

A workspace API key (a13n_...)

In: header

Path Parameters

trace_id*Trace Id
Match^[0-9a-f]{32}$
span_id*Span Id
Match^[0-9a-f]{16}$

Query Parameters

section?Section
Default"all"

Value in

  • "all"
  • "input"
  • "output"
  • "attributes"
  • "resource_attributes"
  • "events"
  • "links"
  • "usage"
offset?Offset

Unicode code-point offset; continue with next_offset.

Range0 <= value
Default0
limit?Limit

Maximum Unicode code points in this fragment.

Range1 <= value <= 4000
Default4000
version?|

Content version from the first read; required after offset 0.

query?|

Case-sensitive literal text search.

Header Parameters

X-Workspace-ID?|

The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/traces/string/spans/string/content"
{  "items": [    {      "has_more": true,      "match_offset": 0,      "media_type": "text/plain",      "next_offset": 0,      "offset": 0,      "query": "string",      "representation": "fragment",      "source": "string",      "source_truncated": false,      "text": "string",      "total_chars": 0,      "version": "string"    }  ],  "next_cursor": "string"}