MetricBufferPolicy

Controls what happens when the number of distinct metric series in WarpMetricExporter reaches maxMetrics.

Unlike span buffers, a metric's accumulated value does not grow with the number of events — a counter recording a million increments still takes O(1) space. Buffer caps therefore apply to the number of distinct metric series (unique MetricKeys), not to the number of events. A cap is only needed when code creates an unbounded fan-out of label combinations (a label cardinality explosion).

Every eviction is logged with the evicted key, so an operator can tell which series were dropped.

Entries

Link copied to clipboard

Drop the metric series that was last written earliest (by insertion order).

Link copied to clipboard

Drop the metric series that was last written most recently.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.