Distribution

class Distribution(val values: Map<Double, Long>, val truncated: Boolean = false) : MetricValue

Distinct values with their occurrence counts - maps to CloudWatch Values and Counts.

Required for percentiles, and opt-in per instrument because memory grows with the number of distinct values and a latency histogram's values are near-unique.

Parameters

values

value to occurrence count. Chunked at export to the backend's pair limit.

truncated

true when the distinct-value bound was reached and further new values were discarded, so an exporter can warn rather than let partial data read as complete.

Constructors

Link copied to clipboard
constructor(values: Map<Double, Long>, truncated: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Summarises rather than dumps: a latency distribution holds one entry per distinct value.