Skip to content

saturnflyer/appsignal

 
 

Repository files navigation

AppSignal agent

This gem collects error and performance data from your Rails applications and sends it to AppSignal

Build Status Gem Version Code Climate

Pull requests / issues

New features should be made in an issue or pullrequest. Title format is as follows:

name [request_count]

example

tagging [2]

Postprocessing middleware

Appsignal sends Rails ActiveSupport::Notification-events to AppSignal over SSL. These events contain basic metadata such as a name and timestamps, and additional 'payload' log data. Appsignal uses a postprocessing middleware stack to clean up events before they get sent to appsignal.com. You can add your own middleware to this stack in config/environment/my_env.rb.

Examples

Minimal template

class MiddlewareTemplate
  def call(event)
    # modify the event in place
    yield # pass control to the next middleware
    # modify the event some more
  end
end

Appsignal.post_processing_middleware.add MiddlewareTemplate

Remove boring payloads

class RemoveBoringPayload
  def call(event)
    event.payload.clear unless event.name == 'interesting'
    yield
  end
end

Development

Run rake bundle or, or run bundle install for all Gemfiles:

bundle --gemfile gemfiles/capistrano2.gemfile
bundle --gemfile gemfiles/capistrano3.gemfile
bundle --gemfile gemfiles/no_dependencies.gemfile
bundle --gemfile gemfiles/rails-3.0.gemfile
bundle --gemfile gemfiles/rails-3.1.gemfile
bundle --gemfile gemfiles/rails-3.2.gemfile
bundle --gemfile gemfiles/rails-4.0.gemfile
bundle --gemfile gemfiles/rails-4.1.gemfile
bundle --gemfile gemfiles/rails-4.2.gemfile
bundle --gemfile gemfiles/sinatra.gemfile

To run the spec suite with a specific Gemfile:

BUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-3.0.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-3.1.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec

Or run rake generate_bundle_and_spec_all to generate a script that runs specs for all Ruby versions and gem combinations we support. You need Rvm or Rbenv to do this. Travis will run specs for these combinations as well.

About

AppSignal agent

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%