Struct opentelemetry_prometheus::ExporterBuilder[][src]

pub struct ExporterBuilder { /* fields omitted */ }

Configuration for the prometheus exporter.

Implementations

impl ExporterBuilder[src]

pub fn with_resource(self, resource: Resource) -> Self[src]

Set the resource to be associated with all Meters for this exporter

pub fn with_cache_period(self, period: Duration) -> Self[src]

Set the period which a recently-computed result will be returned without gathering metric data again.

If the period is zero, caching of the result is disabled (default).

pub fn with_default_summary_quantiles(self, quantiles: Vec<f64>) -> Self[src]

Set the default summary quantiles to be used by exported prometheus histograms

pub fn with_default_histogram_boundaries(self, boundaries: Vec<f64>) -> Self[src]

Set the default boundaries to be used by exported prometheus histograms

pub fn with_registry(self, registry: Registry) -> Self[src]

Set the prometheus registry to be used by this exporter

pub fn try_init(self) -> Result<PrometheusExporter, MetricsError>[src]

Sets up a complete export pipeline with the recommended setup, using the recommended selector and standard processor.

pub fn init(self) -> PrometheusExporter[src]

Sets up a complete export pipeline with the recommended setup, using the recommended selector and standard processor.

Panics

This panics if the exporter cannot be registered in the prometheus registry.

Trait Implementations

impl Debug for ExporterBuilder[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for ExporterBuilder[src]

fn default() -> ExporterBuilder[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.