Configuration
Options to finetune RoRvsWild to your needs
Ignore requests, jobs, exceptions and plugins
From the configuration file config/rorvswild.yml
, you can tell RorVsWild to skip monitoring some requests, jobs, exceptions and plugins.
# config/rorvswild.yml
production:
api_key: API_KEY
ignore_requests:
- HeartbeatController#show
- !ruby/regexp /SecretController/ # Ignore the entire controller
ignore_jobs:
- SecretJob
- !ruby/regexp /Secret::/ # Ignore the entire Secret namespace
ignore_exceptions:
- ActionController::RoutingError # Ignore by default any 404
- ZeroDivisionError
- !ruby/regexp /Secret::/ # Ignore all secret errors
ignore_plugins:
- Sidekiq # If you don't want to monitor your Sidekiq jobs
Here is the equivalent if you prefer initialising RorVsWild manually.
# config/initializers/rorvswild.rb
RorVsWild.start(
api_key: "API_KEY",
ignore_requests: ["ApplicationController#heartbeat", /SecretController/],
ignore_jobs: ["SecretJob", /Secret::/],
ignore_exceptions: ["ActionController::RoutingError", "ZeroDivisionError", /Secret::/],
ignore_plugins: ["Sidekiq"])
Plugins you can ignore:
- ActionController
- ActionMailer
- ActionView
- ActiveJob
- ActiveRecord
- DelayedJob
- Elasticsearch
- Mongo
- NetHttp
- Redis
- Resque
- Sidekiq
Change logger
By default RoRvsWild uses Rails.logger
or standard output. However in some cases you want to isolate RoRvsWild’s logs. To do that, you have to specifiy the log destination via the logger option:
# config/rorvswild.yml
production:
api_key: API_KEY
logger: log/rorvswild.yml
Here is the equivalent if you prefer initialising RoRvsWild manually:
# config/initializers/rorvswild.rb
RorVsWild.start(api_key: "API_KEY", logger: "log/rorvswild.log")
In the case you want a custom logger such as Syslog, you can only do it by initialising it manually:
# config/initializers/rorvswild.rb
RorVsWild.start(api_key: "API_KEY", logger: Logger::Syslog.new)