Ruby APM with Linux / Windows
  • 19 Jun 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Ruby APM with Linux / Windows

  • Print
  • Share
  • Dark
    Light

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?