Ruby APM with Linux / Windows
  • 1 Minute to read
  • Dark
    Light
  • PDF

Ruby APM with Linux / Windows

  • Dark
    Light
  • PDF

Article Summary

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

Prerequisite

Ruby Profiler 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'

Rails

Profiler will startup automatically, no additional configuration.

Non-Rails

Include StackifyRubyAPM::Middleware when starting your application:

# config.ru

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

# application startup

at_exit { StackifyRubyAPM.stop }

Sinatra

# config.ru

require 'stackify-ruby-apm'
require 'sinatra/base'

class MyApp < Sinatra::Base
  use StackifyRubyAPM::Middleware

  # get '/' do ... 

end

StackifyRubyAPM.start 

run MyApp

at_exit { StackifyRubyAPM.stop }

Build and Deploy your application.

Verify

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

Troubleshooting

Review the Troubleshooting Guide.


Was this article helpful?