The Rails adapter adds Rack middleware that catches unhandled exceptions, sends them with the request context and re-raises, so Rails handles the error as usual. A Railtie inserts it for you; no initialiser is needed.
Install from GitHub. Not on RubyGems yet. Sources: bliptrace-ruby, bliptrace-rails.
Install
# Gemfile
gem "g8scope", git: "https://github.com/bliptrace/bliptrace-ruby"
gem "g8scope-rails", git: "https://github.com/bliptrace/bliptrace-rails"
Then bundle install.
Configure
Environment variables are enough:
| Variable | Purpose |
|---|---|
BLIPTRACE_KEY |
Ingest key. Required to turn capture on |
BLIPTRACE_ENDPOINT |
https://ingest.bliptrace.com |
BLIPTRACE_ENVIRONMENT |
Defaults to Rails.env |
BLIPTRACE_RELEASE |
Version or commit SHA |
Or in code, which wins over the environment:
# config/application.rb
config.bliptrace = {
key: ENV["BLIPTRACE_KEY"],
endpoint: "https://ingest.bliptrace.com",
release: "1.4.2"
}
Without a key the adapter stays dormant. Authorization and Cookie headers are removed before sending.
For a plain Rack app: require "g8scope/rails/middleware" then use G8Scope::Rails::Middleware, key: ENV["BLIPTRACE_KEY"].