pub struct DatadogTraceLayerBuilder<S> { /* private fields */ }Expand description
A builder for DatadogTraceLayer.
Implementations§
Source§impl<S> DatadogTraceLayerBuilder<S>where
S: Subscriber + for<'a> LookupSpan<'a>,
impl<S> DatadogTraceLayerBuilder<S>where
S: Subscriber + for<'a> LookupSpan<'a>,
Sourcepub fn agent_address(self, agent_address: impl Into<String>) -> Self
pub fn agent_address(self, agent_address: impl Into<String>) -> Self
Sets the agent_address. This is required.
Sourcepub fn default_tag(
self,
key: impl Into<Cow<'static, str>>,
value: impl Into<String>,
) -> Self
pub fn default_tag( self, key: impl Into<Cow<'static, str>>, value: impl Into<String>, ) -> Self
Adds a fixed default tag to all spans.
This can be used multiple times for several tags.
Default tags are overridden by tags set explicitly on a span.
Sourcepub fn container_id(self, container_id: impl Into<String>) -> Self
pub fn container_id(self, container_id: impl Into<String>) -> Self
Sets the container ID. This enables infrastructure metrics in APM for supported platforms.
Sourcepub fn enable_logs(self, enable_logs: bool) -> Self
pub fn enable_logs(self, enable_logs: bool) -> Self
Enables or disables structured logging with trace correlation to stdout. Disabled by default.
Sourcepub fn build(self) -> Result<DatadogTraceLayer<S>, BuilderError>
pub fn build(self) -> Result<DatadogTraceLayer<S>, BuilderError>
Consumes the builder to construct the tracing layer.
Auto Trait Implementations§
impl<S> Freeze for DatadogTraceLayerBuilder<S>
impl<S> RefUnwindSafe for DatadogTraceLayerBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for DatadogTraceLayerBuilder<S>where
S: Send,
impl<S> Sync for DatadogTraceLayerBuilder<S>where
S: Sync,
impl<S> Unpin for DatadogTraceLayerBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for DatadogTraceLayerBuilder<S>where
S: UnwindSafe,
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