Sha256: 270a97601efe9643fb3e931bf09497efc5aeead6b9bf9d0a846b91e6fe34e90b
Contents?: true
Size: 1.6 KB
Versions: 2
Compression:
Stored size: 1.6 KB
Contents
# PeakflowUtils Various tools to use with www.peakflow.io. ## Installation Add this line to your application's Gemfile: ```ruby gem "peak_flow_utils" ``` And then execute: ```bash $ bundle ``` Or install it yourself as: ```bash $ gem install peak_flow_utils ``` Add this to `config/peakflow.rb`: ```ruby PeakFlowUtils::Notifier.configure(auth_token: "your-token") ``` ## Usage ### Reporting errors manually ```ruby PeakFlowUtils::Notifier.notify(error: error) ``` ### Reporting Rails errors Add this to `config/peakflow.rb`: ```ruby PeakFlowUtils::NotifierRails.configure ``` ### Reporting ActiveJob errors in Rails: If you want the job name and its arguments logged in parameters you can execute this service: ```ruby PeakFlowUtils::ActiveJobParametersLogging.execute! ``` ### Reporting Sidekiq errors in Rails: Add this to `config/peakflow.rb`: ```ruby PeakFlowUtils::NotifierSidekiq.configure ``` If you want the job name and its arguments logged in parameters you can execute this service: ```ruby PeakFlowUtils::SidekiqParametersLogging.execute! ``` ### Sidekiq and Postgres pings Add this to `routes.rb`: ```ruby Rails.application.routes.draw do mount PeakFlowUtils::Engine => "/peakflow_utils" ``` Add these to .env variables: ``` PEAKFLOW_PINGS_USERNAME=username PEAKFLOW_PINGS_PASSWORD=secret-password ``` You can now add a HTTP ping on this path: `/peakflow_utils/pings/sidekiq` And this for Postgres: `/pings/postgres_connections` ## Contributing Contribution directions go here. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
peak_flow_utils-0.1.19 | README.md |
peak_flow_utils-0.1.18 | README.md |