Expand description
Shared API response types for Otelite
This module defines the canonical API response structures used across otelite-server, otelite-cli, and otelite-tui. All types derive both Serialize and Deserialize to support both server-side serialization and client-side deserialization.
Structs§
- Cache
HitRate ByModel - Cache token efficiency per model.
hit_rate= cache_read_tokens / (cache_read_tokens + input_tokens). Only set when at least one of the token counts is non-zero. - Calls
Series Point - Single time-bucket point for calls-over-time series.
- Conversation
Cost Row - Aggregated cost/token row for a single conversation.
- Conversation
Depth Stats - Turn-count distribution across all observed conversations.
- Cost
Series Point - A single time-bucketed cost/usage data point
- Error
Rate ByModel - Error-rate summary for LLM spans grouped by model.
- Error
Response - Standard error response for all API endpoints
- Error
Type Breakdown - Per-(model, error_type) breakdown of error spans, bucketed into actionable categories.
- Finish
Reason Count - Distribution entry for a single finish reason
- Histogram
Bucket - Histogram bucket
- Histogram
Value - Histogram value
- Latency
Stats - Latency / TTFT percentile statistics for LLM spans, grouped by model.
- LogEntry
- Individual log entry for API response
- Logs
Response - Response for log listing
- MaxTokens
Bucket - Distribution of
gen_ai.request.max_tokensvalues across LLM calls. - Metric
Response - Metric response
- Model
Drift Pair - A (request_model → response_model) pair that providers actually served.
differs == truemeans the provider silently rerouted to a different model snapshot. - Model
Usage - Token usage for a specific model
- Quantile
- Quantile
- Request
Param Profile - Distribution of request parameter settings (temperature, max_tokens).
- Resource
- Resource information
- Retrieval
Stats - Retrieval / RAG statistics aggregated across retriever spans.
- Retry
Stats - Retry statistics across LLM spans.
- Session
Cost Row - Aggregated cost/token row for a single session.
- Span
Entry - Individual span entry
- Span
Event - Span event
- Span
Status - Span status
- Summary
Value - Summary value
- System
Usage - Token usage for a specific system (provider)
- Temperature
Bucket - Distribution of
gen_ai.request.temperaturevalues across LLM calls. - Token
Usage Response - Token usage summary response for GenAI/LLM spans
- Token
Usage Summary - Overall token usage summary
- Tool
Usage - Aggregated per-tool usage for tool-execution spans.
- TopRetrieval
Query - A single grouped retrieval query with aggregate stats.
- TopSpan
- A single top-N expensive LLM span
- Trace
Detail - Detailed trace with all spans
- Trace
Entry - Individual trace entry (aggregated from spans)
- Traces
Response - Response for trace listing
- Truncation
Rate ByModel - Truncation rate (finish_reason = max_tokens/length) per model.
Enums§
- Metric
Value - Metric value (can be different types)
- TopSpan
Sort - Sort dimension for top-N span queries.