Class: Bugstack::Configuration
- Inherits:
-
Object
- Object
- Bugstack::Configuration
- Defined in:
- lib/bugstack/configuration.rb
Overview
Configuration for the BugStack SDK.
Instance Attribute Summary collapse
-
#api_key ⇒ String
BugStack API key (required).
-
#auto_fix ⇒ Boolean
Enable autonomous error fixing.
-
#before_send ⇒ Proc?
Hook to inspect/modify/drop events before sending.
-
#debug ⇒ Boolean
Log SDK activity to console.
-
#deduplication_window ⇒ Float
Deduplication window in seconds.
-
#dry_run ⇒ Boolean
Log errors but don’t send them.
-
#enabled ⇒ Boolean
Kill switch — set to false to disable everything.
-
#endpoint ⇒ String
BugStack API endpoint.
-
#environment ⇒ String
Environment name.
-
#ignored_errors ⇒ Array<Class, String>
Error types or messages to ignore.
-
#max_retries ⇒ Integer
Max retry attempts.
-
#project_id ⇒ String
Project identifier.
-
#timeout ⇒ Float
HTTP timeout in seconds.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/bugstack/configuration.rb', line 52 def initialize @api_key = "" @endpoint = "https://api.bugstack.dev/api/capture" @project_id = "" @environment = "production" @auto_fix = false @enabled = true @debug = false @dry_run = false @deduplication_window = 300.0 @timeout = 5.0 @max_retries = 3 @ignored_errors = [] @before_send = nil end |
Instance Attribute Details
#api_key ⇒ String
Returns BugStack API key (required).
14 15 16 |
# File 'lib/bugstack/configuration.rb', line 14 def api_key @api_key end |
#auto_fix ⇒ Boolean
Returns Enable autonomous error fixing.
26 27 28 |
# File 'lib/bugstack/configuration.rb', line 26 def auto_fix @auto_fix end |
#before_send ⇒ Proc?
Returns Hook to inspect/modify/drop events before sending.
50 51 52 |
# File 'lib/bugstack/configuration.rb', line 50 def before_send @before_send end |
#debug ⇒ Boolean
Returns Log SDK activity to console.
32 33 34 |
# File 'lib/bugstack/configuration.rb', line 32 def debug @debug end |
#deduplication_window ⇒ Float
Returns Deduplication window in seconds.
38 39 40 |
# File 'lib/bugstack/configuration.rb', line 38 def deduplication_window @deduplication_window end |
#dry_run ⇒ Boolean
Returns Log errors but don’t send them.
35 36 37 |
# File 'lib/bugstack/configuration.rb', line 35 def dry_run @dry_run end |
#enabled ⇒ Boolean
Returns Kill switch — set to false to disable everything.
29 30 31 |
# File 'lib/bugstack/configuration.rb', line 29 def enabled @enabled end |
#endpoint ⇒ String
Returns BugStack API endpoint.
17 18 19 |
# File 'lib/bugstack/configuration.rb', line 17 def endpoint @endpoint end |
#environment ⇒ String
Returns Environment name.
23 24 25 |
# File 'lib/bugstack/configuration.rb', line 23 def environment @environment end |
#ignored_errors ⇒ Array<Class, String>
Returns Error types or messages to ignore.
47 48 49 |
# File 'lib/bugstack/configuration.rb', line 47 def ignored_errors @ignored_errors end |
#max_retries ⇒ Integer
Returns Max retry attempts.
44 45 46 |
# File 'lib/bugstack/configuration.rb', line 44 def max_retries @max_retries end |
#project_id ⇒ String
Returns Project identifier.
20 21 22 |
# File 'lib/bugstack/configuration.rb', line 20 def project_id @project_id end |
#timeout ⇒ Float
Returns HTTP timeout in seconds.
41 42 43 |
# File 'lib/bugstack/configuration.rb', line 41 def timeout @timeout end |