BufferPolicy

Controls what happens when the in-memory CRDT buffer reaches maxSpans.

Honest limits

An offline-forever device cannot buffer forever. The degradation is intentionally asymmetric and accounted for — never silent:

  • Metrics compress losslessly (a counter is O(1) regardless of how many increments happen offline). Buffer caps only apply to spans and logs.

  • When a cap is hit, the BufferPolicy decides what gives way, and the loss is always visible. How it is made visible differs by exporter, because the two run at very different rates:

The DROP_OLDEST strategy is usually right: oldest spans are already "done" and are the least likely to complete a trace being actively sampled right now.

Entries

Link copied to clipboard

Drop the oldest buffered entry when the buffer is full.

Link copied to clipboard

Drop the newest entry when the buffer is full.

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.