- All Superinterfaces:
Instrument
A monotonically increasing metric that uses a long. Useful for integral values such as the number of bytes received,
number of requests, etc.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add one to the current countervoid
incrementBy
(long inc) Increment the countervoid
incrementBy
(long inc, Map<String, Object> attributes) Increment the counter.Methods inherited from interface org.elasticsearch.telemetry.metric.Instrument
getName
-
Field Details
-
NOOP
Noop counter for use in tests.
-
-
Method Details
-
increment
void increment()Add one to the current counter -
incrementBy
void incrementBy(long inc) Increment the counter- Parameters:
inc
- amount to increment
-
incrementBy
Increment the counter.- Parameters:
inc
- amount to incrementattributes
- key-value pairs to associate with this increment
-