Ruby SDK Configuration
Complete reference for all configuration options.Configuration Block
config/initializers/brainzlab.rb
Authentication
| Option | Type | Description |
|---|---|---|
secret_key | String | Required. Your API key from the dashboard |
Environment Settings
| Option | Type | Default | Description |
|---|---|---|---|
environment | String | Rails.env | Environment name |
service | String | App name | Service/application name |
host | String | Hostname | Server hostname |
commit | String | Auto-detected | Git commit SHA |
branch | String | Auto-detected | Git branch name |
Recall Settings
| Option | Type | Default | Description |
|---|---|---|---|
recall_enabled | Boolean | true | Enable/disable logging |
recall_min_level | Symbol | :debug | Minimum log level |
recall_buffer_size | Integer | 50 | Logs to buffer before flush |
recall_flush_interval | Integer | 5 | Seconds between flushes |
recall_url | String | Cloud URL | Recall server URL |
Log Levels
| Level | Value | Use Case |
|---|---|---|
:debug | 0 | Detailed debugging info |
:info | 1 | General information |
:warn | 2 | Warning conditions |
:error | 3 | Error conditions |
:fatal | 4 | Critical errors |
Reflex Settings
| Option | Type | Default | Description |
|---|---|---|---|
reflex_enabled | Boolean | true | Enable/disable error tracking |
reflex_excluded_exceptions | Array | [] | Exceptions to ignore |
reflex_sample_rate | Float | nil | Sample rate (0.0-1.0), nil = 100% |
reflex_before_send | Proc | nil | Callback to modify/drop errors |
reflex_url | String | Cloud URL | Reflex server URL |
Pulse Settings
| Option | Type | Default | Description |
|---|---|---|---|
pulse_enabled | Boolean | true | Enable/disable APM |
pulse_sample_rate | Float | nil | Sample rate (0.0-1.0), nil = 100% |
pulse_buffer_size | Integer | 50 | Traces to buffer before flush |
pulse_flush_interval | Integer | 5 | Seconds between flushes |
pulse_excluded_paths | Array | ['/health', '/ping'] | Paths to exclude from tracing |
pulse_url | String | Cloud URL | Pulse server URL |
Instrumentation
Control which libraries are automatically instrumented:| Option | Type | Default | Description |
|---|---|---|---|
instrument_http | Boolean | true | Net::HTTP, Faraday, HTTParty |
instrument_active_record | Boolean | true | SQL queries |
instrument_redis | Boolean | true | Redis commands |
instrument_sidekiq | Boolean | true | Sidekiq jobs |
instrument_delayed_job | Boolean | true | Delayed::Job |
instrument_graphql | Boolean | true | GraphQL queries |
instrument_mongodb | Boolean | true | MongoDB operations |
instrument_elasticsearch | Boolean | true | Elasticsearch queries |
instrument_action_mailer | Boolean | true | Email delivery |
instrument_grape | Boolean | true | Grape API |
Data Scrubbing
| Option | Type | Default | Description |
|---|---|---|---|
scrub_fields | Array | Common fields | Fields to scrub from logs/errors |