diff --git a/jupyter_server/prometheus/metrics.py b/jupyter_server/prometheus/metrics.py index 77dce9e54..b79361344 100644 --- a/jupyter_server/prometheus/metrics.py +++ b/jupyter_server/prometheus/metrics.py @@ -6,10 +6,12 @@ """ from prometheus_client import Gauge, Histogram, Info + from jupyter_server._version import version_info as server_version_info try: from notebook._version import version_info as notebook_version_info + v6_notebook_present = notebook_version_info != server_version_info except ImportError: # notebook._version is not present, so notebook v6 can not be present