pub struct TelemetryConfigBuilder { /* private fields */ }Expand description
Builder for TelemetryConfig.
Implementations§
Source§impl TelemetryConfigBuilder
impl TelemetryConfigBuilder
pub fn service_name(self, name: impl Into<String>) -> Self
pub fn resource_attributes(self, attributes: Vec<(String, String)>) -> Self
pub fn with_resource_attribute( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn traces_enabled(self, enabled: bool) -> Self
pub fn metrics_enabled(self, enabled: bool) -> Self
pub fn logs_enabled(self, enabled: bool) -> Self
pub fn otlp_protocol(self, protocol: OtlpProtocol) -> Self
pub fn otlp_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn otlp_headers(self, headers: Vec<(String, String)>) -> Self
pub fn with_otlp_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn rust_log(self, filter: impl Into<String>) -> Self
pub fn json_logging(self, enabled: bool) -> Self
pub fn metrics_export_interval_ms(self, ms: u64) -> Self
Sourcepub fn propagators(self, propagators: Vec<PropagatorKind>) -> Self
pub fn propagators(self, propagators: Vec<PropagatorKind>) -> Self
Set which context propagation format(s) to install globally. Pass an
empty Vec to disable propagation entirely.
pub fn build(self) -> TelemetryConfig
Trait Implementations§
Source§impl Debug for TelemetryConfigBuilder
impl Debug for TelemetryConfigBuilder
Source§impl Default for TelemetryConfigBuilder
impl Default for TelemetryConfigBuilder
Source§fn default() -> TelemetryConfigBuilder
fn default() -> TelemetryConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TelemetryConfigBuilder
impl RefUnwindSafe for TelemetryConfigBuilder
impl Send for TelemetryConfigBuilder
impl Sync for TelemetryConfigBuilder
impl Unpin for TelemetryConfigBuilder
impl UnsafeUnpin for TelemetryConfigBuilder
impl UnwindSafe for TelemetryConfigBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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