Get Session Stats
get_session_statsAnalyze a single conversation session to get detailed trace statistics: span count, services involved, time bounds, LLM success and error counts, latency percentiles, and token usage.
Instructions
Get detailed statistics for a single conversation/session.
Analyzes span count, distinct services, time bounds, LLM request/success/ error counts, latency percentiles, and token usage for every span sharing the given gen_ai.conversation.id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"conversation_id": "<conversation_id>"
},
"name": "get_session_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum spans to analyze (default: 1000) | |
| end_time | No | End time in ISO 8601 format | |
| start_time | No | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) | |
| service_name | No | Filter by service name | |
| conversation_id | Yes | The gen_ai.conversation.id to analyze |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |