SummaryBuilder

Builder class for creating Summary metrics.

Summaries are used to observe quantiles and provide a summary of observed values, such as request latencies.

Parameters

name

The metric name.

includeCreatedSeries

Whether to include the _created series (timestamp of first observation).

quantiles

List of quantiles to track (e.g., 0.5 for median, 0.95 for 95th percentile) by default it's empty.

maxAgeSeconds

Maximum age of observations before they are discarded (default is 60 seconds).

ageBuckets

Number of age buckets to use for tracking observations (default is 5).

Functions

Link copied to clipboard
open override fun build(): Summary

Sets the quantiles to track in this summary.

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.