PrometheusMetrics

case class PrometheusMetrics[F[_]](namespace: String, registry: CollectorRegistry, metrics: List[Metric[F, _]], endpointPrefix: EndpointInput[Unit])
Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def addCustom(m: Metric[F, _]): PrometheusMetrics[F]

Registers a custom metric.

Registers a custom metric.

def addRequestsActive(labels: MetricLabels): PrometheusMetrics[F]

Registers a $namespace_request_active{path, method} gauge (assuming default labels).

Registers a $namespace_request_active{path, method} gauge (assuming default labels).

def addRequestsDuration(labels: MetricLabels, clock: Clock): PrometheusMetrics[F]

Registers a $namespace_request_duration_seconds{path, method, status, phase} histogram (assuming default labels).

Registers a $namespace_request_duration_seconds{path, method, status, phase} histogram (assuming default labels).

def addRequestsTotal(labels: MetricLabels): PrometheusMetrics[F]

Registers a $namespace_request_total{path, method, status} counter (assuming default labels).

Registers a $namespace_request_total{path, method, status} counter (assuming default labels).

def metricsInterceptor(ignoreEndpoints: Seq[AnyEndpoint]): MetricsRequestInterceptor[F]

The interceptor which can be added to a server's options, to enable metrics collection.

The interceptor which can be added to a server's options, to enable metrics collection.

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy val metricsEndpoint: ServerEndpoint[Any, F]

An endpoint exposing the current metric values.

An endpoint exposing the current metric values.