Skip to content
Rack middleware to set the process name to what request is currently being processed.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
rack-process-name.gemspec

README.md

Rack::ProcessName

Set the process name to what request is currently being processed. If you're lucky and your OS shows process name changes, you'll see something like:

15696 ttys001    0:07.04 script/rails S GET http://localhost:3000/servers/localhost/edit   

The letter before the request method means:

  • R - running
  • S - sleeping (last response was ok)
  • E - error (last response raised an exception)

Installation

In Rails, just add to your Gemfile:

gem 'rack-process-name'

the gem will include itself as middleware.

If in Sinatra or using config.ru:

require 'rack-process-name'
use Rack::ProcessName
Something went wrong with that request. Please try again.