Struct opentelemetry_sdk::metrics::MeterProviderBuilder
source · pub struct MeterProviderBuilder { /* private fields */ }
Expand description
Configuration options for a MeterProvider.
Implementations§
source§impl MeterProviderBuilder
impl MeterProviderBuilder
sourcepub fn with_resource(self, resource: Resource) -> Self
pub fn with_resource(self, resource: Resource) -> Self
Associates a Resource with a MeterProvider.
This Resource represents the entity producing telemetry and is associated with all Meters the MeterProvider will create.
By default, if this option is not used, the default Resource will be used.
sourcepub fn with_reader<T: MetricReader>(self, reader: T) -> Self
pub fn with_reader<T: MetricReader>(self, reader: T) -> Self
Associates a MetricReader with a MeterProvider.
By default, if this option is not used, the MeterProvider will perform no operations; no data will be exported without a MetricReader.
sourcepub fn with_view<T: View>(self, view: T) -> Self
pub fn with_view<T: View>(self, view: T) -> Self
Associates a View with a MeterProvider.
Views are appended to existing ones in a MeterProvider if this option is used multiple times.
By default, if this option is not used, the MeterProvider will use the default view.
sourcepub fn build(self) -> SdkMeterProvider
pub fn build(self) -> SdkMeterProvider
Construct a new MeterProvider with this configuration.
Trait Implementations§
source§impl Debug for MeterProviderBuilder
impl Debug for MeterProviderBuilder
source§impl Default for MeterProviderBuilder
impl Default for MeterProviderBuilder
source§fn default() -> MeterProviderBuilder
fn default() -> MeterProviderBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MeterProviderBuilder
impl !RefUnwindSafe for MeterProviderBuilder
impl Send for MeterProviderBuilder
impl Sync for MeterProviderBuilder
impl Unpin for MeterProviderBuilder
impl !UnwindSafe for MeterProviderBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more