File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 147
147
//! using the bitwise or operator:
148
148
//!
149
149
//! ```
150
+ //! use sentry::integrations::tracing::EventFilter;
151
+ //! use tracing_subscriber::prelude::*;
152
+ //!
150
153
//! let sentry_layer = sentry::integrations::tracing::layer()
151
154
//! .event_filter(|md| match *md.level() {
152
155
//! tracing::Level::ERROR => EventFilter::Event | EventFilter::Log,
153
156
//! tracing::Level::TRACE => EventFilter::Ignore,
154
157
//! _ => EventFilter::Log,
155
158
//! })
156
159
//! .span_filter(|md| matches!(*md.level(), tracing::Level::ERROR | tracing::Level::WARN));
160
+ //!
161
+ //! tracing_subscriber::registry()
162
+ //! .with(tracing_subscriber::fmt::layer())
163
+ //! .with(sentry_layer)
164
+ //! .init();
157
165
//! ```
158
166
//!
159
167
//! If you're using a custom event mapper instead of an event filter, use `EventMapping::Combined`.
You can’t perform that action at this time.
0 commit comments