Jobs Metrics

Metrician can automatically report metrics about your delayed_job, resque, or sidekiq job system.

Configuration

Metrician requires 2 configuration options be set in your copy of metrician.yaml to report jobs metrics. Timing and error metrics are enabled by default. For each job or error, the name of the job class in question can also be reported as part of the metric. The following are the default settings.

:jobs:
  :enabled: true
  :run:
    :enabled: true
  :error:
    :enabled: true
  :job_specific:
    :enabled: false

Metrics

Metrician can report the following metrics. The metrics including <job_name> must be enabled with the job_specific configuration setting.
app.jobs.run the average time (ms) it takes for jobs to execute
app.jobs.error the number of times jobs raise exceptions during execution
app.jobs.run.job.<job_name> the average time (ms) it takes for specific types of jobs to execute
app.jobs.error.job.<job_name> the number of times specific types of jobs raise exceptions during execution

Jobs Metrics Query Language Expressions

The current job execution rate can be computed with the following expression on a graph:

gauge_count(app.jobs.run)

The total wall time jobs spend executing can be computed with the following expression:

gauge_total(app.jobs.run)

Job error rate can be computed with the following expression:

app.jobs.error / gauge_count(app.jobs.run)
Questions? We can help!