Get Agent Spans
Returns spans that trace an Agent's execution.
Path Parameters
The ID of the agent to get spans for.
Query Parameters
The earliest timestamp (as seconds since the epoch) to query.
Defaults to 15 minutes before the current time.
The latest timestamp (as seconds since the epoch) to query.
Defaults to the current time.
The maximum number of spans to return.
Defaults to 100. Cannot be more than 1000.
The offset of the first span to return.
The ID of the conversation to get spans for.
The ID of the message to get spans for.
Possible values: [STATUS_CODE_UNSET
, STATUS_CODE_OK
, STATUS_CODE_ERROR
]
The status code of spans to return.
- 200
- default
OK
Schema
- Array [
- ]
spans object[]
The timestamp at which the span started.
The trace ID of the span.
The span ID of the span.
The parent span ID of the span.
The duration of the span in milliseconds.
The name of the span.
Possible values: [SPAN_KIND_INTERNAL
, SPAN_KIND_SERVER
, SPAN_KIND_CLIENT
, SPAN_KIND_PRODUCER
, SPAN_KIND_CONSUMER
]
The kind of the span.
Possible values: [STATUS_CODE_UNSET
, STATUS_CODE_OK
, STATUS_CODE_ERROR
]
The status code of the span.
The status message of the span.
Additional attributes set on the span.
{
"spans": [
{
"timestamp": "2024-03-07T22:56:08.362Z",
"traceId": "string",
"spanId": "string",
"parentSpanId": "string",
"durationMs": 0,
"name": "string",
"kind": "SPAN_KIND_INTERNAL",
"statusCode": "STATUS_CODE_UNSET",
"statusMessage": "string",
"attributes": {}
}
]
}
Default error response
Schema
- Array [
- ]
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
The type of the serialized message.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}