Class: Bulldogger::Config
- Inherits:
-
Object
- Object
- Bulldogger::Config
- Defined in:
- lib/bulldogger/config.rb
Overview
Sets bounded runtime policy for capture, replay, redaction, and file output. It does not start capture or replay work. Environment overrides let a child change policy without app file changes.
Constant Summary collapse
- DEFAULT_REDACT_PATTERNS =
[ /pass(?:word|wd)?/i, /secret/i, /token/i, /api[_-]?key/i, /\bkey\b/i, /credential/i, /auth/i, /session/i, /cookie/i ].freeze
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#frame_source ⇒ Object
Returns the value of attribute frame_source.
-
#max_frames ⇒ Object
Returns the value of attribute max_frames.
-
#max_locals ⇒ Object
Returns the value of attribute max_locals.
-
#max_pending ⇒ Object
Returns the value of attribute max_pending.
-
#max_replays ⇒ Object
Returns the value of attribute max_replays.
-
#max_samples ⇒ Object
Returns the value of attribute max_samples.
-
#max_value_length ⇒ Object
Returns the value of attribute max_value_length.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#redact_patterns ⇒ Object
Returns the value of attribute redact_patterns.
-
#replay_on_failure ⇒ Object
Returns the value of attribute replay_on_failure.
-
#replay_timeout ⇒ Object
Returns the value of attribute replay_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/bulldogger/config.rb', line 24 def initialize @enabled = true @output_dir = "tmp/bulldogger" @max_frames = 20 @max_locals = 50 @max_value_length = 200 @max_pending = 32 @max_samples = 10 @redact_patterns = DEFAULT_REDACT_PATTERNS.dup @frame_source = :auto # Failure-only replay keeps full recording away from green runs, where # measurement showed a runtime cost of about sixty times. @replay_on_failure = true @max_replays = 1 @replay_timeout = 60 apply_env_overrides end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def enabled @enabled end |
#frame_source ⇒ Object
Returns the value of attribute frame_source.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def frame_source @frame_source end |
#max_frames ⇒ Object
Returns the value of attribute max_frames.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_frames @max_frames end |
#max_locals ⇒ Object
Returns the value of attribute max_locals.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_locals @max_locals end |
#max_pending ⇒ Object
Returns the value of attribute max_pending.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_pending @max_pending end |
#max_replays ⇒ Object
Returns the value of attribute max_replays.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_replays @max_replays end |
#max_samples ⇒ Object
Returns the value of attribute max_samples.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_samples @max_samples end |
#max_value_length ⇒ Object
Returns the value of attribute max_value_length.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def max_value_length @max_value_length end |
#output_dir ⇒ Object
Returns the value of attribute output_dir.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def output_dir @output_dir end |
#redact_patterns ⇒ Object
Returns the value of attribute redact_patterns.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def redact_patterns @redact_patterns end |
#replay_on_failure ⇒ Object
Returns the value of attribute replay_on_failure.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def replay_on_failure @replay_on_failure end |
#replay_timeout ⇒ Object
Returns the value of attribute replay_timeout.
20 21 22 |
# File 'lib/bulldogger/config.rb', line 20 def replay_timeout @replay_timeout end |