ReliabilityMetrics

org.llm4s.reliability.ReliabilityMetrics
@Experimental

The metrics ReliableClient records, declared as Metrics and recorded through MetricsCollector.increment, so every backend that exports generic metrics exports them, with no method of its own to implement (#2801). They were three methods of MetricsCollector with no-op defaults - recordRetryAttempt, recordCircuitBreakerTransition and recordError - which a backend that did not override them dropped silently, as the Prometheus one did.

A Prometheus backend exposes them as llm4s_retries_total, llm4s_circuit_breaker_transitions_total and llm4s_reliability_errors_total; a Micrometer one under the names below.

Attributes

Source
ReliabilityMetrics.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

The error_type label of Errors for kind.

The error_type label of Errors for kind.

Attributes

Source
ReliabilityMetrics.scala

The state label of CircuitBreakerTransitions for state.

The state label of CircuitBreakerTransitions for state.

Attributes

Source
ReliabilityMetrics.scala

Concrete fields

Circuit-breaker state transitions. Labels: provider, state (open, closed or half-open).

Circuit-breaker state transitions. Labels: provider, state (open, closed or half-open).

Attributes

Source
ReliabilityMetrics.scala

Errors ReliableClient reports outside a timed request: a call rejected by its local rate limit or its open circuit, a deadline exceeded, and the final failure once retries are exhausted. Kept apart from a backend's count of failed requests, which already holds each failed attempt the provider client observed, so neither counts a failure twice. Labels: provider, error_type (an ErrorKind, in snake case).

Errors ReliableClient reports outside a timed request: a call rejected by its local rate limit or its open circuit, a deadline exceeded, and the final failure once retries are exhausted. Kept apart from a backend's count of failed requests, which already holds each failed attempt the provider client observed, so neither counts a failure twice. Labels: provider, error_type (an ErrorKind, in snake case).

Attributes

Source
ReliabilityMetrics.scala

Retries: one for each attempt after a call's first. Label: provider.

Retries: one for each attempt after a call's first. Label: provider.

Attributes

Source
ReliabilityMetrics.scala