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
As it says on the tin, re-defining these metrics results in an error. This bug is preventing the notebook and jupyter_server packages from peacefully co-existing.
In [3]: fromnotebookimportlogIn [4]: fromjupyter_serverimportlog---------------------------------------------------------------------------ValueErrorTraceback (mostrecentcalllast)
<ipython-input-4-026e191fd69c>in<module>---->1fromjupyter_serverimportlog/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/jupyter_server/log.pyin<module>8importjson9fromtornado.logimportaccess_log--->10from .prometheus.log_functionsimportprometheus_log_method1112/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/jupyter_server/prometheus/log_functions.pyin<module>---->1from .metricsimportHTTP_REQUEST_DURATION_SECONDS234defprometheus_log_method(handler):
5 """
/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/jupyter_server/prometheus/metrics.pyin<module>1011--->12HTTP_REQUEST_DURATION_SECONDS=Histogram(
13'http_request_duration_seconds',
14'duration in seconds for all HTTP requests',
/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/prometheus_client/metrics.pyin__init__(self, name, documentation, labelnames, namespace, subsystem, unit, registry, labelvalues, buckets)
489 ):
490self._prepare_buckets(buckets)
-->491super(Histogram, self).__init__(
492name=name,
493documentation=documentation,
/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/prometheus_client/metrics.pyin__init__(self, name, documentation, labelnames, namespace, subsystem, unit, registry, labelvalues)
105# Register the multi-wrapper parent metric, or if a label-less metric, the whole shebang.106ifregistry:
-->107registry.register(self)
108109deflabels(self, *labelvalues, **labelkwargs):
/tmp/conda_envs/0d2c69b0eca52b083fd9c7e9/lib/python3.8/site-packages/prometheus_client/registry.pyinregister(self, collector)
25duplicates=set(self._names_to_collectors).intersection(names)
26ifduplicates:
--->27raiseValueError(
28'Duplicated timeseries in CollectorRegistry: {0}'.format(
29duplicates))
ValueError: DuplicatedtimeseriesinCollectorRegistry: {'http_request_duration_seconds_sum', 'http_request_duration_seconds_created', 'http_request_duration_seconds_bucket', 'http_request_duration_seconds_count'}
The text was updated successfully, but these errors were encountered:
blink1073
changed the title
Prometheus Metrics Import Error
Prometheus Metrics Duplication Error
Apr 25, 2020
As it says on the tin, re-defining these metrics results in an error. This bug is preventing the
notebook
andjupyter_server
packages from peacefully co-existing.The text was updated successfully, but these errors were encountered: