counter
DSL-style function to build and register a Counter using a CounterBuilder.
Example:
val requests = counter("http_requests_total") {
help("Total HTTP requests")
labelNames("method", "status")
}Content copied to clipboard
Return
A configured Counter instance.
Parameters
name
The base name of the counter metric.
block
Configuration block for the CounterBuilder.