Struct sentry_tracing::SentryLayer
source · [−]pub struct SentryLayer<S> { /* private fields */ }Expand description
Provides a tracing layer that dispatches events to sentry
Implementations
pub fn event_filter<F>(self, filter: F) -> Self where
F: Fn(&Metadata<'_>) -> EventFilter + Send + Sync + 'static,
pub fn event_filter<F>(self, filter: F) -> Self where
F: Fn(&Metadata<'_>) -> EventFilter + Send + Sync + 'static,
pub fn event_mapper<F>(self, mapper: F) -> Self where
F: Fn(&Event<'_>, Context<'_, S>) -> EventMapping + Send + Sync + 'static,
pub fn event_mapper<F>(self, mapper: F) -> Self where
F: Fn(&Event<'_>, Context<'_, S>) -> EventMapping + Send + Sync + 'static,
Sets a custom event mapper function.
The mapper is responsible for creating either breadcrumbs or events from
Events.
Trait Implementations
When a new Span gets created, run the filter and start a new sentry span if it passes, setting it as the current sentry span.
When a span gets closed, finish the underlying sentry span, and set back its parent as the current sentry span.
Implement the writing of extra data to span
Notifies this layer that an event has occurred.
Performs late initialization when attaching a Layer to a
Subscriber. Read more
Registers a new callsite with this layer, returning whether or not
the layer is interested in being notified about the callsite, similarly
to Subscriber::register_callsite. Read more
Returns true if this layer is interested in a span or event with the
given metadata in the current Context, similarly to
Subscriber::enabled. Read more
Notifies this layer that a span with the ID span recorded that it
follows from the span with the ID follows. Read more
Notifies this layer that a span with the given ID was entered.
Notifies this layer that the span with the given ID was exited.
Notifies this layer that a span ID has been cloned, and that the subscriber returned a different ID. Read more
Composes this layer around the given Layer, returning a Layered
struct implementing Layer. Read more
Composes this Layer with the given Subscriber, returning a
Layered struct that implements Subscriber. Read more
