I-typed instruments to
V typed values.
This utility allows load metrics to have a protocol-agnostic means to track streams
past their initial response future. For example, if
V represents an HTTP response
type, an implementation could add
H-typed handles to each response's extensions to
detect when the response is dropped.
Handles are intended to be RAII guards that primarily implement
Drop and update load
metric state as they are dropped.
impl<H, V> Instrument<H, V> for NoInstrument is provided to drop the handle
immediately. This is appropriate when a response is discrete and cannot comprise
In many cases, the
Output type is simply
Instrument may alter the
type in order to instrument it appropriately. For example, an HTTP Instrument may
modify the body type: so an
Instrument that takes values of type
may output values of type
The instrumented value type.
fn instrument(&self, handle: H, value: V) -> Self::Output
H-typed handle to a