Skip to main content

Module api

Module api 

Source
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§

CostSeriesPoint
A single time-bucketed cost/usage data point
ErrorRateByModel
Error-rate summary for LLM spans grouped by model.
ErrorResponse
Standard error response for all API endpoints
FinishReasonCount
Distribution entry for a single finish reason
HistogramBucket
Histogram bucket
HistogramValue
Histogram value
LatencyStats
Latency / TTFT percentile statistics for LLM spans, grouped by model.
LogEntry
Individual log entry for API response
LogsResponse
Response for log listing
MetricResponse
Metric response
ModelUsage
Token usage for a specific model
Quantile
Quantile
Resource
Resource information
RetryStats
Retry statistics across LLM spans.
SpanEntry
Individual span entry
SpanEvent
Span event
SpanStatus
Span status
SummaryValue
Summary value
SystemUsage
Token usage for a specific system (provider)
TokenUsageResponse
Token usage summary response for GenAI/LLM spans
TokenUsageSummary
Overall token usage summary
ToolUsage
Aggregated per-tool usage for tool-execution spans.
TopSpan
A single top-N expensive LLM span
TraceDetail
Detailed trace with all spans
TraceEntry
Individual trace entry (aggregated from spans)
TracesResponse
Response for trace listing

Enums§

MetricValue
Metric value (can be different types)