HomePhabricator

Use metrics to provide some basic stats about the service

Authored by polishdeveloper on May 10 2018, 12:56 AM.

Description

Use metrics to provide some basic stats about the service

We would like to to provide a simple way to track the service
health and the amount of the jobs it processes. Checking logs
is time consuming. Instead, lets use StatsD to increment stats
and use Graphana to provide nice dashboard to monitor service
health.

Stats introduced:
Buckets:

  • request.type.desktop
  • request.type.mobile
  • request.format.letter
  • request.format.a4
  • request.format.legal
  • queue.timeout
  • queue.full
  • queue.new
  • queue.abort.count
  • job.started
  • job.successful
  • job.failed
  • job.failed.error.not_found
  • job.failed.error.server_error
  • job.failed.error.unknown
  • job.abort.count

Timers:

  • job.wait_time
  • job.timeout
  • queue.abort.time
  • job.abort.time

Gauges:

  • queue.jobs_count
  • request.pdf.size

Bug: T189307
Change-Id: I126dd0629989a5501dc0b3bf8b8d64820f3ade1b