Project

simple_apm

0.02
Low commit activity in last 3 years
A long-lived project that still receives updates
xyy: Simple Apm View for rails using redis.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 2.1

Runtime

 Project Readme

SimpleApm (Rails Engine)

A lightweight Redis-backed Rails engine for web request performance monitoring and slow request tracing.

SimpleApm records request performance by day:

  • The slowest requests, 500 by default.
  • The slowest 20 requests for each action.
  • Average response time for each action.
  • Slow request details and related SQL details, trimming excess records.
  • Average and slowest response time, request count, and other metrics in 10-minute intervals, with charts.
  • External HTTP request duration during each request.

The web UI supports English and Chinese. English is used by default, and users can switch languages from the top-right corner.

How It Works

SimpleApm records request-level data around Rack and uses Redis for storage and aggregation.

The core data flow is based on Active Support Instrumentation.

Instrumentation events are processed by a long-running worker thread so request handling does not block on metric aggregation.

Memory usage is collected with get_process_mem. In Linux testing, collection takes less than 1 ms.

Screenshots

  • Dashboard Dashboard

  • Slow Requests Slow Requests

  • Action List Action List

  • Request Info Request Info

  • Action Info Action Info

  • Data Management Data Management

Usage

Mount the engine in your Rails routes:

# routes.rb
mount SimpleApm::Engine => "/apm"

Or run the installer:

rails generate simple_apm:install

Installation

Add this line to your application's Gemfile:

gem "simple_apm"

Then run:

bundle

Contributing

Issues and pull requests are welcome.

License

The gem is available as open source under the terms of the MIT License.