You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Prometheus](https://prometheus.io/) provides a standard
metrics format that can be collected and used in many contexts.
- From the browser
to drive 'current resource usage' displays, such
as https://github.com/yuvipanda/nbresuse
- From a prometheus server
to collect historical data for operational analysis and
performance monitoring
Example: https://grafana.mybinder.org/dashboard/db/1-overview?refresh=1m&orgId=1
for mybinder.org metrics from JupyterHub and BinderHub,
via prometheus server at https://prometheus.mybinder.org
The JupyterHub and BinderHub projects already expose Prometheus
metrics natively. Adding this to the Jupyter notebook server
allows us to instrument the code easily and in
a standard format that has lots of 3rd party tooling for it.
This commit does the following:
- Introduce the `prometheus_client` library as a dependency.
This library has no dependencies of its own and is pure python.
- Add an authenticated `/metrics` endpoint to the server,
which returns metrics in Prometheus Text Format
- Expose the default process metrics from `prometheus_client`,
which include memory usage and CPU usage info (for just the
notebook process)
0 commit comments