Trait opentelemetry::sdk::export::metrics::InstrumentationLibraryReader
source · [−]pub trait InstrumentationLibraryReader {
fn try_for_each(
&self,
f: &mut dyn FnMut(&InstrumentationLibrary, &mut dyn Reader)
) -> Result<(), MetricsError>;
}
Available on crate feature
metrics
only.Expand description
InstrumentationLibraryReader is an interface for exporters to iterate over one instrumentation library of metric data at a time.
Required Methods
sourcefn try_for_each(
&self,
f: &mut dyn FnMut(&InstrumentationLibrary, &mut dyn Reader)
) -> Result<(), MetricsError>
fn try_for_each(
&self,
f: &mut dyn FnMut(&InstrumentationLibrary, &mut dyn Reader)
) -> Result<(), MetricsError>
ForEach calls the passed function once per instrumentation library, allowing the caller to emit metrics grouped by the library that produced them.