mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 05:23:01 +00:00

This patch introduces Prometheus for exposing metrics about JupyterHub's operation. We expose a standard /metrics endpoint that can be queried without authentication. We take on prometheus_client as an unconditional dependency to both simplify code & because it is a pure python package with no dependencies itself. The first pass adds 'RED' style metrics for all HTTP requests. http://rancher.com/red-method-for-prometheus-3-key-metrics-for-monitoring/ has some info on the RED method, but to summarize: For each request type, record at least the following metrics Rate – the number of requests, per second, your services are serving. Errors – the number of failed requests per second. Duration – The amount of time each request takes expressed as a time interval. This instantly gives us a lot of useful metrics in a very compact form.
9 lines
199 B
Python
9 lines
199 B
Python
from .base import *
|
|
from .login import *
|
|
|
|
from . import base, pages, login, metrics
|
|
|
|
default_handlers = []
|
|
for mod in (base, pages, login, metrics):
|
|
default_handlers.extend(mod.default_handlers)
|