OpenTelemetryMetrics

Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def apply[F[_]](meter: Meter): OpenTelemetryMetrics[F]
def apply[F[_]](otel: OpenTelemetry): OpenTelemetryMetrics[F]
def apply[F[_]](otel: OpenTelemetry, metrics: List[Metric[F, _]]): OpenTelemetryMetrics[F]
def default[F[_]](otel: OpenTelemetry): OpenTelemetryMetrics[F]

Using the default labels, registers the following metrics:

Using the default labels, registers the following metrics:

  • request_active{path, method} (up-down-counter)
  • request_total{path, method, status} (counter)
  • request_duration{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.

def default[F[_]](otel: OpenTelemetry, labels: MetricLabels): OpenTelemetryMetrics[F]

Registers default metrics (see other variants) using custom labels.

Registers default metrics (see other variants) using custom labels.

def default[F[_]](meter: Meter): OpenTelemetryMetrics[F]

Using the default labels, registers the following metrics:

Using the default labels, registers the following metrics:

  • request_active{path, method} (up-down-counter)
  • request_total{path, method, status} (counter)
  • request_duration{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.

def default[F[_]](meter: Meter, labels: MetricLabels): OpenTelemetryMetrics[F]

Registers default metrics (see other variants) using custom labels.

Registers default metrics (see other variants) using custom labels.

def requestActive[F[_]](meter: Meter, labels: MetricLabels): Metric[F, LongUpDownCounter]
def requestDuration[F[_]](meter: Meter, labels: MetricLabels): Metric[F, DoubleHistogram]
def requestTotal[F[_]](meter: Meter, labels: MetricLabels): Metric[F, LongCounter]