pub struct OpenTelemetry { /* private fields */ }
Available on crate feature
opentelemetry
only.Expand description
OpenTelemetry configuration.
This struct contains different OpenTelemetry providers for metrics, traces, and logs. If set, these providers will be used to collect and export telemetry data.
Implementations§
Source§impl OpenTelemetry
impl OpenTelemetry
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Checks if any of the providers are enabled.
Sourcepub fn with_metrics(self, metrics: impl Into<Option<SdkMeterProvider>>) -> Self
Available on crate feature opentelemetry-metrics
only.
pub fn with_metrics(self, metrics: impl Into<Option<SdkMeterProvider>>) -> Self
opentelemetry-metrics
only.Sets the metrics provider.
Sourcepub fn with_traces(self, traces: impl Into<Option<SdkTracerProvider>>) -> Self
Available on crate feature opentelemetry-traces
only.
pub fn with_traces(self, traces: impl Into<Option<SdkTracerProvider>>) -> Self
opentelemetry-traces
only.Sets the traces provider.
Sourcepub fn with_logs(self, logs: impl Into<Option<SdkLoggerProvider>>) -> Self
Available on crate feature opentelemetry-logs
only.
pub fn with_logs(self, logs: impl Into<Option<SdkLoggerProvider>>) -> Self
opentelemetry-logs
only.Sets the logs provider.
Trait Implementations§
Source§impl Clone for OpenTelemetry
impl Clone for OpenTelemetry
Source§fn clone(&self) -> OpenTelemetry
fn clone(&self) -> OpenTelemetry
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpenTelemetry
impl Debug for OpenTelemetry
Source§impl Default for OpenTelemetry
impl Default for OpenTelemetry
Source§fn default() -> OpenTelemetry
fn default() -> OpenTelemetry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenTelemetry
impl !RefUnwindSafe for OpenTelemetry
impl Send for OpenTelemetry
impl Sync for OpenTelemetry
impl Unpin for OpenTelemetry
impl !UnwindSafe for OpenTelemetry
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