DelayedJobMetrics

Expose Prometheus Metrics for Delayed Jobs.

Installation

Gemfile content

Add this line to your application's Gemfile:

gem 'delayed_job_metrics'

And then execute:

$~> bundle install

Or install it yourself as:

$~> gem install delayed_job_metrics

Usage & Configurations

  • Enable metrics middelware
DELAYED_JOB_METRICS_ENABLED=true
  • Start Rails server and start scraping metrics
$~> curl -fs http://127.0.0.1:3000/metrics
  • Overwrite the default metrics endpoint
DELAYED_JOB_METRICS_ENNDPOINT=/my_endpoint
  • Setup basic auth

Basic Auth Configurations

Use the below environment variables to setup the basic authentication for the metrics endpiint

HTAUTH_METRICS_USER=user
HTAUTH_METRICS_PASSWORD=secret