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 147147//! using the bitwise or operator: 
148148//! 
149149//! ``` 
150+ //! use sentry::integrations::tracing::EventFilter; 
151+ //! use tracing_subscriber::prelude::*; 
152+ //! 
150153//! let sentry_layer = sentry::integrations::tracing::layer() 
151154//!     .event_filter(|md| match *md.level() { 
152155//!         tracing::Level::ERROR => EventFilter::Event | EventFilter::Log, 
153156//!         tracing::Level::TRACE => EventFilter::Ignore, 
154157//!         _ => EventFilter::Log, 
155158//!     }) 
156159//!     .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(); 
157165//! ``` 
158166//! 
159167//! 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