Ruby APM with Docker
  • 18 Jun 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark

Ruby APM with Docker

  • Print
  • Share
  • Dark

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


Follow the Retrace Docker Install Guide.

Ruby Docker Setup

Add Stackify Ruby APM GEM

Add the Stackify APM GEM to each application to monitor.
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 }

Running your Application

Start your application with the stackify shared volume.

docker run -v stackify:/usr/local/stackify [your-application-image]


Make application requests, you can then verify results in the Retrace dashboard.

Was This Article Helpful?