Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions api-reference/warehouse/get_spans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ Retrieve spans from the data warehouse with flexible filtering and pagination op
List of environment project IDs to filter by.
</ParamField>

<ParamField query="fromTimestampSec" type="int64" required>
<ParamField query="from_timestamp_sec" type="int64" required>
Start time in Unix seconds timestamp.
</ParamField>

<ParamField query="toTimestampSec" type="int64" required>
<ParamField query="to_timestamp_sec" type="int64" required>
End time in Unix seconds timestamp.
</ParamField>

<ParamField query="workflowName" type="string">
<ParamField query="workflow" type="string">
Filter spans by workflow name.
</ParamField>

<ParamField query="attributes" type="map[string]string">
Key-value pairs of attributes to filter by.
</ParamField>

<ParamField query="spanName" type="string">
<ParamField query="span_name" type="string">
Filter spans by span name.
</ParamField>

<ParamField query="sortOrder" type="string">
<ParamField query="sort_order" type="string">
Sort order for results. Accepted values: `asc` or `desc`.
</ParamField>

Expand All @@ -61,14 +61,12 @@ Retrieve spans from the data warehouse with flexible filtering and pagination op
</ParamField>

<ParamField query="filters" type="FilterCondition[]">
Array of filter conditions to apply to the query.
</ParamField>
Array of filter conditions to apply to the query. Each filter should have `id`, `value`, and `operator` fields. Filters must be URL-encoded.

<ParamField query="logicalOperator" type="string">
Logical operator to apply between filter conditions. Accepted values: `AND` or
`OR`.
Supported operators: `equals`, `not_equals`, `greater_than`, `less_than`, `exists`, `not_exists`, `contains`, `starts_with`
</ParamField>


## Response

Returns an array of Span objects:
Expand Down Expand Up @@ -101,7 +99,7 @@ Returns an array of Span objects:
The trace state information.
</ResponseField>

<ResponseField name="spanName" type="string">
<ResponseField name="span_name" type="string">
The name of the span.
</ResponseField>
Comment on lines +102 to 104
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Example response doesn't match updated field name documentation.

Line 106 documents the response field as span_name (snake_case), but the example response on line 186 still has "spanName" (camelCase). This creates a breaking inconsistency for API consumers.

Update the example response to match the new field name:

     "parentSpanId": "span_parent_789",
     "traceState": "",
-    "spanName": "llm.completion",
+    "span_name": "llm.completion",
     "spanKind": "CLIENT",

Also applies to: 186-186

🤖 Prompt for AI Agents
In api-reference/warehouse/get_spans.mdx around lines 106-108 (and example at
line 186), the docs define the response field as "span_name" (snake_case) but
the example JSON still uses "spanName" (camelCase); update the example response
at line 186 (and any other examples) to use "span_name" instead of "spanName" so
the example matches the documented field name, and run a quick search in this
file to replace any remaining camelCase occurrences of this field.


Expand Down