pub struct GlideOpenTelemetryConfigBuilder { /* private fields */ }Expand description
Builder for configuring OpenTelemetry in GLIDE
This struct allows you to configure how telemetry data (traces and metrics) is exported.
flush_interval_ms: Sets the interval between consecutive exports of telemetry data.traces_config: Optional configuration for exporting trace data. IfNone, trace data will not be exported.metrics_config: Optional configuration for exporting metrics data. IfNone, metrics data will not be exported.
If both traces_config and metrics_config are None, no telemetry data will be exported.
Implementations§
Source§impl GlideOpenTelemetryConfigBuilder
impl GlideOpenTelemetryConfigBuilder
Sourcepub fn with_flush_interval(self, duration: Duration) -> Self
pub fn with_flush_interval(self, duration: Duration) -> Self
Configure the flush interval in milliseconds
duration: The duration between consecutive exports of telemetry data.
Sourcepub fn with_trace_exporter(
self,
exporter: GlideOpenTelemetrySignalsExporter,
sample_percentage: Option<u32>,
) -> Self
pub fn with_trace_exporter( self, exporter: GlideOpenTelemetrySignalsExporter, sample_percentage: Option<u32>, ) -> Self
Configure the trace exporter
exporter: The exporter endpoint to use for trace data.sample_percentage: The percentage of requests to sample and create a span for, used to measure command duration. IfNone, the default value ofDEFAULT_TRACE_SAMPLE_PERCENTAGEwill be used.
Sourcepub fn with_metrics_exporter(
self,
exporter: GlideOpenTelemetrySignalsExporter,
) -> Self
pub fn with_metrics_exporter( self, exporter: GlideOpenTelemetrySignalsExporter, ) -> Self
Configure the metrics exporter
exporter: The exporter endpoint to use for metrics data.
pub fn build(self) -> GlideOpenTelemetryConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlideOpenTelemetryConfigBuilder
impl RefUnwindSafe for GlideOpenTelemetryConfigBuilder
impl Send for GlideOpenTelemetryConfigBuilder
impl Sync for GlideOpenTelemetryConfigBuilder
impl Unpin for GlideOpenTelemetryConfigBuilder
impl UnsafeUnpin for GlideOpenTelemetryConfigBuilder
impl UnwindSafe for GlideOpenTelemetryConfigBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request