MetricsConfigLoader
org.llm4s.config.MetricsConfigLoader
object MetricsConfigLoader
Loads the Prometheus metrics backend from llm4s.metrics: a org.llm4s.metrics.MetricsCollector, plus the org.llm4s.metrics.PrometheusEndpoint serving it when one was started.
This replaces Llm4sConfig.metrics(), which left core with Prometheus (#1133): MetricsConfigLoader.default() is the same call against the same keys.
Configuration keys, with their defaults in this module's reference.conf:
llm4s.metrics.enabled: enable metrics collection (default: false)llm4s.metrics.prometheus.enabled: use the Prometheus backend when metrics are enabled (default: true)llm4s.metrics.prometheus.port: port for the/metricsHTTP endpoint (default: 9090)
Example application.conf:
llm4s {
metrics {
enabled = true
prometheus {
enabled = true
port = 9090
}
}
}
When enabled, loading starts the HTTP endpoint; stop it with PrometheusEndpoint.stop(). Other code should receive the MetricsCollector by dependency injection rather than read these keys itself.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MetricsConfigLoader.type
Members list
In this article