MetricBuilder

abstract class MetricBuilder<T : SimpleCollector<*>>

Base class for building SimpleCollector instances with a fluent and idiomatic DSL.

Parameters

T

The specific collector type being built.

Inheritors

Functions

Link copied to clipboard
abstract fun build(): T

Builds and returns the metric instance.

Link copied to clipboard
fun help(help: String)

Sets the help description for the metric.

Link copied to clipboard
fun labelNames(vararg labelNames: String)

Sets the label names that this metric will use.

Link copied to clipboard
fun unit(unit: String)

Sets the unit of the metric.