Package io.opentelemetry.api.metrics
Interface BoundLongHistogram
@ThreadSafe
public interface BoundLongHistogram
A histogram instrument that records
long values with pre-associated attributes.-
Method Summary
Modifier and TypeMethodDescriptionvoidrecord(long value) Records a value with a pre-bound set of attributes.voidrecord(long value, io.opentelemetry.context.Context context) Records a value with a pre-bound set of attributes.voidunbind()Unbinds the current bound instance from theLongHistogram.
-
Method Details
-
record
void record(long value) Records a value with a pre-bound set of attributes.Note: This may use
Context.current()to pull the context associated with this measurement.- Parameters:
value- The amount of the measurement.
-
record
void record(long value, io.opentelemetry.context.Context context) Records a value with a pre-bound set of attributes.- Parameters:
value- The amount of the measurement.context- The explicit context to associate with this measurement.
-
unbind
void unbind()Unbinds the current bound instance from theLongHistogram.After this method returns the current instance is considered invalid (not being managed by the instrument).
-