Supported Versions
- We currently support all versions of Grape since 1.2.
Installation steps
Add the Atatus agent gem to your Gemfile.
copygem 'atatus'
Install the Atatus Ruby agent.
copybundle install
The Ruby bundle install will automatically require Atatus.
Config File Structure:
The Ruby agent's
atatus.yml
is a YAML configuration file comprising a common section followed by environment-specific sections likedevelopment
,testing
, andproduction
.Environment Detection:
The agent selects the config section based on environment variables like RUBY_ENV, RAILS_ENV, or RACK_ENV. If none are set, it defaults to the development environment.
Failure to indent correctly may result in the agent throwing an error during startup, indicating "Unable to parse configuration file".
development: license_key: 'YOUR_LICENSE_KEY' app_name: "grape app (Development)" production: license_key: 'YOUR_LICENSE_KEY' app_name: "grape app (Production)"
Example:
config/atatus.yml
development: license_key: 'lic_apm_******' app_name: "grape app (Development)" production: license_key: 'lic_apm_******' app_name: "grape app (Production)"
Add middleware to start (and stop) Atatus when booting your app.
# Example config.ru require 'grape' module MyModule class API < Grape::API use Atatus::Middleware # ... end end Atatus::Grape.start(MyModule::API) run MyModule::API
5. Restart your Grape ruby server to view your performance data within minutes.