PrometheusMetrics

sttp.tapir.server.metrics.prometheus.PrometheusMetrics
See thePrometheusMetrics companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def default[F[_]](namespace: String, registry: PrometheusRegistry, labels: MetricLabels): PrometheusMetrics[F]

Using the default namespace and labels, registers the following metrics:

Using the default namespace and labels, registers the following metrics:

  • $namespace_request_active{path, method} (gauge)
  • $namespace_request_total{path, method, status} (counter)
  • $namespace_request_duration_seconds{path, method, status, phase} (histogram)

Status is by default the status code class (1xx, 2xx, etc.), and phase can be either headers or body - request duration is measured separately up to the point where the headers are determined, and then once again when the whole response body is complete.

Attributes

def requestActive[F[_]](registry: PrometheusRegistry, namespace: String, labels: MetricLabels): Metric[F, Gauge]
def requestDuration[F[_]](registry: PrometheusRegistry, namespace: String, labels: MetricLabels, clock: Clock): Metric[F, Histogram]
def requestTotal[F[_]](registry: PrometheusRegistry, namespace: String, labels: MetricLabels): Metric[F, Counter]

Implicits

Implicits

implicit val prometheusRegistryCodec: Codec[String, PrometheusRegistry, TextPlain]
implicit val schemaForPrometheusRegistry: Schema[PrometheusRegistry]