Skip to content

Commit

Permalink
Unconditionally import notebook.prometheus?
Browse files Browse the repository at this point in the history
let's see if we end up in a loop, kinda?
  • Loading branch information
yuvipanda committed Oct 29, 2024
1 parent 209386d commit a114351
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jupyter_server/prometheus/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
Read https://prometheus.io/docs/practices/naming/ for naming
conventions for metrics & labels.
"""
# Do this to see if we end up in an import loop?
from notebook.prometheus.metrics import (
HTTP_REQUEST_DURATION_SECONDS,
KERNEL_CURRENTLY_RUNNING_TOTAL,
TERMINAL_CURRENTLY_RUNNING_TOTAL,
)

try:
# Jupyter Notebook also defines these metrics. Re-defining them results in a ValueError.
Expand Down

0 comments on commit a114351

Please sign in to comment.