PrometheusMetrics

sttp.tapir.server.metrics.prometheus.PrometheusMetrics
See thePrometheusMetrics companion object
case class PrometheusMetrics[F[_]](namespace: String, registry: CollectorRegistry, metrics: List[Metric[F, _]], endpointPrefix: EndpointInput[Unit])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

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

Registers a custom metric.

Registers a custom metric.

Attributes

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).

Attributes

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).

Attributes

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).

Attributes

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.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

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.

Attributes