Package io.opentelemetry.api.metrics
Interface SynchronousInstrument<B extends SynchronousInstrument.BoundInstrument>
-
- Type Parameters:
B- the specific type of Bound Instrument this instrument can provide.
- All Superinterfaces:
Instrument
- All Known Subinterfaces:
DoubleCounter,DoubleUpDownCounter,DoubleValueRecorder,LongCounter,LongUpDownCounter,LongValueRecorder
@ThreadSafe public interface SynchronousInstrument<B extends SynchronousInstrument.BoundInstrument> extends Instrument
SynchronousInstrument is an interface that defines a type of instruments that are used to report measurements synchronously. That is, when the user reports individual measurements as they occur.Synchronous instrument events additionally have a Context associated with them, describing properties of the associated trace and distributed correlation values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSynchronousInstrument.BoundInstrumentstatic interfaceSynchronousInstrument.BuilderBuilder class forSynchronousInstrument.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Bbind(Labels labels)Returns aBound Instrumentassociated with the specified labels.
-
-
-
Method Detail
-
bind
B bind(Labels labels)
Returns aBound Instrumentassociated with the specified labels. Multiples requests with the same set of labels may return the sameBound Instrumentinstance.It is recommended that callers keep a reference to the Bound Instrument instead of always calling this method for every operation.
- Parameters:
labels- the set of labels, as key-value pairs.- Returns:
- a
Bound Instrument - Throws:
java.lang.NullPointerException- iflabelValuesis null.
-
-