LongAdder

LongAdder-based counter implementation. LongAdder counters are safe to share across threads and provide superior write performance over Atomic values in cases where the writes largely outweigh the reads, which is the common case in Kamon counters (writing every time something needs to be tracked, reading roughly once per minute).

trait Counter
class Object
trait Matchable
class Any

Value members

Concrete methods

override def increment(): Counter
Definition Classes
override def increment(times: Long): Counter
Definition Classes
override def snapshot(resetState: Boolean): Long
Definition Classes
Snapshotting

Inherited methods

def autoUpdate(consumer: Counter => Unit, interval: Duration): Counter
Inherited from:
BaseMetricAutoUpdate
def autoUpdate(consumer: Counter => Unit): Counter

Schedules a call to the provided consumer with a reference to this histogram as parameter. The schedule uses the default auto-update interval. See the kamon.metric.instrument-factory configuration settings for more details.

Schedules a call to the provided consumer with a reference to this histogram as parameter. The schedule uses the default auto-update interval. See the kamon.metric.instrument-factory configuration settings for more details.

Inherited from:
Instrument
def autoUpdate(consumer: Consumer[Counter], interval: Duration): Counter

Schedules a call to the provided consumer with a reference to this histogram as parameter, overriding the metric's auto-update interval.

Schedules a call to the provided consumer with a reference to this histogram as parameter, overriding the metric's auto-update interval.

Inherited from:
Instrument
def autoUpdate(consumer: Consumer[Counter]): Counter

Schedules a call to the provided consumer with a reference to this histogram as parameter. The schedule uses the default auto-update interval. See the kamon.metric.instrument-factory configuration settings for more details.

Schedules a call to the provided consumer with a reference to this histogram as parameter. The schedule uses the default auto-update interval. See the kamon.metric.instrument-factory configuration settings for more details.

Inherited from:
Instrument
def defaultSchedule(): Unit
Inherited from:
BaseMetricAutoUpdate
def remove(): Boolean

Removes this instrument from the metric.

Removes this instrument from the metric.

Inherited from:
Instrument
override def withTag(key: String, value: Long): Counter
Definition Classes
Inherited from:
Instrument
override def withTag(key: String, value: Boolean): Counter
Definition Classes
Inherited from:
Instrument
override def withTag(key: String, value: String): Counter
Definition Classes
Inherited from:
Instrument
override def withTags(tags: TagSet): Counter
Definition Classes
Inherited from:
Instrument

Concrete fields