Ruby APM with Heroku
  • 1 Minute to read
  • Dark
  • PDF

Ruby APM with Heroku

  • Dark
  • PDF

Article summary

This document details how to install the Ruby APM Profiler in your Ruby application running on Heroku.

Ruby Application Setup

Add Stackify APM Module

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 }

Add Buildpack

heroku buildpacks:add -i=1

Configure Buildpack

heroku config:set STACKIFY_KEY="XXXXXXXXXX"
heroku config:set STACKIFY_APPLICATION_NAME="My Application" 
heroku config:set STACKIFY_ENVIRONMENT_NAME="Production" 

Set STACKIFY_KEY to your Stackify Activation Key.


Deploy changes to Heroku and make requests. You can then verify results in the Retrace dashboard.

Was this article helpful?