ZioMetrics

sttp.tapir.server.metrics.zio.ZioMetrics$
See theZioMetrics companion class
object ZioMetrics

Attributes

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

Members list

Concise view

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, labels: MetricLabels): ZioMetrics[F]

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

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

  • tapir_request_active{path, method} (gauge)
  • tapir_request_total{path, method, status} (counter)
  • tapir_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 getActiveRequestCounter(namespace: String): Counter[Long]

Active/Inprogress Counter +1 active, -1 complete.

Active/Inprogress Counter +1 active, -1 complete.

Attributes

def getRequestDurationHistogram(namespace: String): Histogram[Double]

Histogram buckets in seconds.

Histogram buckets in seconds.

Attributes

def getRequestsTotalCounter(namespace: String): Counter[Long]

Total request counter.

Total request counter.

Attributes

def requestActive[F[_]](namespace: String, labels: MetricLabels): Metric[F, Counter[Long]]

Requests active metric collector.

Requests active metric collector.

Attributes

def requestDuration[F[_]](namespace: String, labels: MetricLabels, clock: Clock): Metric[F, Histogram[Double]]

Request duration metric collector.

Request duration metric collector.

Attributes

def requestTotal[F[_]](namespace: String, labels: MetricLabels): Metric[F, Counter[Long]]

Requests total metric collector.

Requests total metric collector.

Attributes

Concrete fields

val DefaultNamespace: String

Default prefix of metric in the zio metric name.

Default prefix of metric in the zio metric name.

Attributes

val DurationBoundaries: Boundaries

Represents general time buckets from .005s to 60s.

Represents general time buckets from .005s to 60s.

Attributes

val runtime: Runtime[Any]

ZIO Default Runtime

ZIO Default Runtime

Attributes