MetricSpec

One of Wow's metrics, which registers its meters: name, type and description, and its tags in the order their values are given. values holds the closed value set of each tag whose values the framework names (an outcome, a kind, a reason); any other tag takes the application's names (a context, an aggregate type, a subscription, a store, a problem code).

unit is the unit of a measured quantity (seconds), and null for a count: an exporter appends a unit to the name (Prometheus' _seconds), so a count carries none. A timer's unit is the registry's own.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val unit: String?
Link copied to clipboard

Functions

Link copied to clipboard
fun counter(registry: MeterRegistry, vararg values: String): Counter

This counter in registry, with values of its tags.

Link copied to clipboard
fun <T : Any> functionCounter(registry: MeterRegistry, source: T, tags: Tags, count: (T) -> Double): FunctionCounter

This counter in registry, read from source by count, with tags.

Link copied to clipboard
fun <T : Any> gauge(registry: MeterRegistry, source: T, tags: Tags, value: (T) -> Double): Gauge

This gauge in registry, read from source by value, with tags.

Link copied to clipboard
fun tagsOf(vararg values: String): Tags

values, one for each of tags in their order, as Micrometer's tags.

Link copied to clipboard
fun timer(registry: MeterRegistry, vararg values: String): Timer

This timer in registry, with values of its tags.

Link copied to clipboard
open override fun toString(): String