Skip to main content

init_with_provider

Function init_with_provider 

Source
pub fn init_with_provider(
    exporter: PrometheusExporter,
    provider: SdkMeterProvider,
) -> bool
Expand description

Initializes the global metric state with the given exporter and provider.

This must be called before any metric is created if you want all instruments to feed into a custom provider (e.g. one that also has an OTLP reader).

Returns false if the state was already initialized.