span_events
Creates, updates, deletes, gets or lists a span_events resource.
Overview
| Name | span_events |
| Type | Resource |
| Id | datadog.llm_observability.span_events |
Fields
The following fields are returned by SELECT queries:
- list_llmobs_spans
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the span. (example: abc123def456) |
attributes | object | Attributes of an Agent Observability span. |
type | string | Resource type for an Agent Observability span. (span) (example: span) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_llmobs_spans | select | filter[from], filter[to], filter[query], filter[span_id], filter[trace_id], filter[span_kind], filter[span_name], filter[ml_app], page[limit], page[cursor], sort, include_attachments | List Agent Observability spans matching the specified filters. | |
search_llmobs_spans | exec | data | Search Agent Observability spans using structured filters in the request body. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
filter[from] | string | Start of the time range. Accepts ISO 8601 or relative format (e.g., now-15m). Defaults to now-15m. |
filter[ml_app] | string | Filter by ML application name. |
filter[query] | string | Search query using Agent Observability query syntax. Supports attribute filters using the field:value syntax (e.g. session_id, trace_id, ml_app, meta.span.kind). When provided, structured field filters (filter[span_id], filter[trace_id], etc.) are ignored. |
filter[span_id] | string | Filter by exact span ID. |
filter[span_kind] | string | Filter by span kind (e.g., llm, agent, tool, task, workflow). |
filter[span_name] | string | Filter by span name. |
filter[to] | string | End of the time range. Accepts ISO 8601 or relative format. Defaults to now. |
filter[trace_id] | string | Filter by exact trace ID. |
include_attachments | boolean | Whether to include attachment data in the response. Defaults to true. |
page[cursor] | string | Cursor from the previous response to retrieve the next page. |
page[limit] | integer (int64) | Maximum number of spans to return. Defaults to 10. |
sort | string | Sort order for the results. |
SELECT examples
- list_llmobs_spans
List Agent Observability spans matching the specified filters.
SELECT
id,
attributes,
type
FROM datadog.llm_observability.span_events
WHERE filter[from] = '{{ filter[from] }}'
AND filter[to] = '{{ filter[to] }}'
AND filter[query] = '{{ filter[query] }}'
AND filter[span_id] = '{{ filter[span_id] }}'
AND filter[trace_id] = '{{ filter[trace_id] }}'
AND filter[span_kind] = '{{ filter[span_kind] }}'
AND filter[span_name] = '{{ filter[span_name] }}'
AND filter[ml_app] = '{{ filter[ml_app] }}'
AND page[limit] = '{{ page[limit] }}'
AND page[cursor] = '{{ page[cursor] }}'
AND sort = '{{ sort }}'
AND include_attachments = '{{ include_attachments }}'
;
Lifecycle Methods
EXEC variables use wire (API) names.
- search_llmobs_spans
Search Agent Observability spans using structured filters in the request body.
EXEC datadog.llm_observability.span_events.search_llmobs_spans
@@json=
'{
"data": "{{ data }}"
}'
;