Versions in this module Expand all Collapse all v6 v6.9.3 Mar 25, 2026 Changes in this version + func SetStatisticsEnabled(enabled bool) + func StatisticsEnabled() bool + type APISnapshot struct + Models map[string]ModelSnapshot + TotalRequests int64 + TotalTokens int64 + type LoggerPlugin struct + func NewLoggerPlugin() *LoggerPlugin + func (p *LoggerPlugin) HandleUsage(ctx context.Context, record coreusage.Record) + type MergeResult struct + Added int64 + Skipped int64 + type ModelSnapshot struct + Details []RequestDetail + TotalRequests int64 + TotalTokens int64 + type RequestDetail struct + AuthIndex string + Failed bool + LatencyMs int64 + Source string + Timestamp time.Time + Tokens TokenStats + type RequestStatistics struct + func GetRequestStatistics() *RequestStatistics + func NewRequestStatistics() *RequestStatistics + func (s *RequestStatistics) MergeSnapshot(snapshot StatisticsSnapshot) MergeResult + func (s *RequestStatistics) Record(ctx context.Context, record coreusage.Record) + func (s *RequestStatistics) Snapshot() StatisticsSnapshot + type StatisticsSnapshot struct + APIs map[string]APISnapshot + FailureCount int64 + RequestsByDay map[string]int64 + RequestsByHour map[string]int64 + SuccessCount int64 + TokensByDay map[string]int64 + TokensByHour map[string]int64 + TotalRequests int64 + TotalTokens int64 + type TokenStats struct + CachedTokens int64 + InputTokens int64 + OutputTokens int64 + ReasoningTokens int64 + TotalTokens int64 v6.9.2-rc1 Mar 25, 2026