Class: Sentry::Metrics::Configuration
- Inherits:
- 
      Object
      
        - Object
- Sentry::Metrics::Configuration
 
- Includes:
- ArgumentCheckingHelper
- Defined in:
- lib/sentry/metrics/configuration.rb
Instance Attribute Summary collapse
- 
  
    
      #before_emit  ⇒ Proc? 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Optional Proc, called before emitting a metric to the aggregator. 
- 
  
    
      #enable_code_locations  ⇒ Boolean 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Enable code location reporting. 
- 
  
    
      #enabled  ⇒ Boolean 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Enable metrics usage. 
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ Configuration 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Configuration. 
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
| 35 36 37 38 | # File 'lib/sentry/metrics/configuration.rb', line 35 def initialize @enabled = false @enable_code_locations = true end | 
Instance Attribute Details
#before_emit ⇒ Proc?
Optional Proc, called before emitting a metric to the aggregator. Use it to filter keys (return false/nil) or update tags. Make sure to return true at the end.
| 33 34 35 | # File 'lib/sentry/metrics/configuration.rb', line 33 def before_emit @before_emit end | 
#enable_code_locations ⇒ Boolean
Enable code location reporting. Will be sent once per day. True by default.
| 18 19 20 | # File 'lib/sentry/metrics/configuration.rb', line 18 def enable_code_locations @enable_code_locations end | 
#enabled ⇒ Boolean
Enable metrics usage. Starts a new Aggregator instance to aggregate metrics and a thread to aggregate flush every 5 seconds.
| 12 13 14 | # File 'lib/sentry/metrics/configuration.rb', line 12 def enabled @enabled end |