Skip to content

//misk-prometheus/misk.metrics.backends.prometheus

Package-level declarations

Types

Name Summary
PrometheusConfig [jvm]
data class PrometheusConfig(val hostname: String? = null, val http_port: Int = 9102, val max_age_in_seconds: Long? = null) : Config
Configuration for exporting metrics to prometheus
PrometheusHttpService [jvm]
@Singleton
class PrometheusHttpService : AbstractIdleService
PrometheusMetricsServiceModule [jvm]
class PrometheusMetricsServiceModule(config: PrometheusConfig) : KAbstractModule
Exposes prometheus metrics over a dedicated port. Allows internal metrics to be exposed via a k8s ClusterIP address, where they can be scraped by a cluster local Prometheus server without also exposing them to the outside world via the port bound to the service load balancer. If using the prometheus operator, one would generally create a k8s ClusterIP service exporting the metrics port, then a prometheus ServiceMonitor selecting that service via a label.