- All Superinterfaces:
Instrument
A monotonically increasing metric that uses a double.
Useful for capturing the number of bytes received, number of requests, etc.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add one to the current counter.void
incrementBy
(double inc) Increment the counter.void
incrementBy
(double 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(double inc) Increment the counter.- Parameters:
inc
- amount to increment, non-negative
-
incrementBy
Increment the counter.- Parameters:
inc
- amount to increment, non-negativeattributes
- key-value pairs to associate with this increment
-