Ruby SDK Installation
Requirements
- Ruby 3.1+
- Rails 7.0+ (for auto-integration)
- Bundler 2.0+
Installation
Add to your Gemfile:Gemfile
Quick Setup
Run the install generator:--key=YOUR_KEY- Set your secret key directly--replace-logger- Replace Rails.logger to send all logs to Recall
Manual Configuration
Basic Configuration
config/initializers/brainzlab.rb
Full Configuration Options
config/initializers/brainzlab.rb
Environment Variables
You can also configure via environment variables:Rails Auto-Integration
The SDK automatically:- Captures request context - request ID, path, method added to all logs
- Captures errors - unhandled exceptions are reported to Reflex
- Identifies users - if you set
current_user, it’s included in reports
Setting User Context
app/controllers/application_controller.rb
Verify Installation
Check that everything is working:Troubleshooting
Logs Not Appearing
- Check your API key is correct
- Verify
recall_enabledis true - Check the minimum log level
Errors Not Captured
- Check your API key is correct
- Verify
reflex_enabledis true - Check
reflex_excluded_exceptions
Need Help?
Support
Get help from the Brainz Lab team