View Source Oak.Metric.Counter (Oak v0.1.0)

Represents a Counter metric.

A Counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero.

Summary

Functions

Increments the counter by the given amount.

Creates a new Counter metric.

Resets the counter to zero.

Returns a string representation of the counter in Prometheus exposition format.

Returns the current value of the counter.

Functions

Link to this function

inc(counter, amount \\ 1)

View Source

Increments the counter by the given amount.

Link to this function

new(name, help, labels \\ %{})

View Source

Creates a new Counter metric.

Resets the counter to zero.

Returns a string representation of the counter in Prometheus exposition format.

Returns the current value of the counter.