Webmachine

This feature requires AppSignal for Ruby version 1.3 or higher.

Installation

A Webmachine application requires a few manual steps to get working.

  1. Create the AppSignal configuration file or configure it with environment variables. For more details on configuring AppSignal, see the Ruby configuration page.
  2. Make sure AppSignal is required, require "appsignal".
  3. Configure AppSignal using Appsignal.config.
  4. Start AppSignal using Appsignal.start.

An example of a Webmachine app.rb file:

Ruby
# app.rb require "webmachine" require "appsignal" Appsignal.start class MyResource < Webmachine::Resource def to_html "<html><body>Hello, world!</body></html>" end end # Start a web server to serve requests via localhost MyResource.run

After these steps, start your Webmachine app and wait for data to arrive in AppSignal.