Ruby APM with AWS Elastic Beanstalk
  • 18 Jun 2020
  • 1 Minute to read
  • Contributors
  • Dark
  • PDF

Ruby APM with AWS Elastic Beanstalk

  • Dark
  • PDF

Instructions on how to install the Retrace Linux Agent and Ruby APM on AWS Elastic Beanstalk.

Add Profiler to Application

Modify application Gemfile:

gem 'stackify-ruby-apm'

Configure Application

Add config/stackify_apm.yml to your application, modify application_name and environment_name.

application_name: 'Ruby Application'
environment_name: 'Production'


Profiler will startup automatically, no additional configuration.


Include StackifyRubyAPM::Middleware when starting your application:


require 'stackify-ruby-apm'
use StackifyRubyAPM::Middleware

# application startup

at_exit { StackifyRubyAPM.stop }

Installing Stackify Linux Agent

  1. Create a new file named stackify.config in your application’s .ebextensions folder. Learn More about .ebextensions.
  2. Add the following to your stackify.config file: Replace [INSERT ACTIVATION KEY] with your activation key value. Optionally you can include the device name by replacing the [aliasname] with the desired device alias. You can find your activation key under Settings: Account.
    command: sudo ./ --key [INSERT ACTIVATION KEY] --environment "Production" --devicealias [aliasname]
    cwd: /home/ec2-user/stackify-agent-install-32bit
  1. Deploy your app to Elastic Beanstalk

Was this article helpful?