counter

fun counter(block: Counter.Builder.() -> Unit): Counter

Creates, configures, and registers a Prometheus Counter.

Return

the registered Counter instance.

Parameters

block

a lambda with Counter.Builder as receiver for configuring name, help, and labels.