Treblle with Ruby on Rails
Requirements
- Ruby 2.0+
- Ruby on Rails 6.1+
Installation
Add the gem to your Gemfile:
Then add following line to config/application.rb
, or if you want to include it to specific environment only, then e.g. config/environments/development.rb
which registers Treblle middleware.
You can then configure the gem:
You can use any of the configuration options below:
Option | Description |
---|---|
config.api_key | (required) Valid API key obtained during registration on treblle.com. |
config.project_id | (required) Valid Project ID obtained after creating a new project on treblle.com. |
config.enabled_environments | (required) Enables monitoring on specified environments. |
config.sensitive_attrs | (optional) Mask additional attributes. |
config.restricted_endpoints | (optional) Routes that you don’t want to monitor. |
config.whitelisted_endpoints | (optional) Routes that you want to monitor, by default /api/ . |