Documentation
¶
Index ¶
Constants ¶
View Source
const ( InterceptionCountStatusFailed = "failed" InterceptionCountStatusCompleted = "completed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// Interception-related metrics.
InterceptionDuration *prometheus.HistogramVec
InterceptionCount *prometheus.CounterVec
InterceptionsInflight *prometheus.GaugeVec
PassthroughCount *prometheus.CounterVec
// Prompt-related metrics.
PromptCount *prometheus.CounterVec
// Token-related metrics.
TokenUseCount *prometheus.CounterVec
// Tool-related metrics.
InjectedToolUseCount *prometheus.CounterVec
NonInjectedToolUseCount *prometheus.CounterVec
// Circuit breaker metrics.
CircuitBreakerState *prometheus.GaugeVec // Current state (0=closed, 0.5=half-open, 1=open)
CircuitBreakerTrips *prometheus.CounterVec // Total times circuit opened
CircuitBreakerRejects *prometheus.CounterVec // Requests rejected due to open circuit
}
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer) *Metrics
NewMetrics creates AND registers metrics. It will panic if a collector has already been registered. Note: we are not specifying namespace in the metrics; the provided registerer may specify a "namespace" using prometheus.WrapRegistererWithPrefix.
Click to show internal directories.
Click to hide internal directories.