diff --git a/README.md b/README.md index a155e6b..86fbf24 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ can set the parameter `--ResourceUseDisplay.mem_warning_threshold=0.1`. ### CPU Usage -`jupyter-resource-usage` can also track CPU usage and report a `cpu_percent` value as part of the `/metrics` response. +`jupyter-resource-usage` can also track CPU usage and report a `cpu_percent` value as part of the `/api/metrics/v1` response. You can set the `cpu_limit` in several ways: diff --git a/jupyter_resource_usage/__init__.py b/jupyter_resource_usage/__init__.py index 2a3cdab..e6f0b88 100644 --- a/jupyter_resource_usage/__init__.py +++ b/jupyter_resource_usage/__init__.py @@ -48,11 +48,6 @@ def load_jupyter_server_extension(nbapp): nbapp.web_app.settings["jupyter_resource_usage_display_config"] = resuseconfig base_url = nbapp.web_app.settings["base_url"] - if not resuseconfig.disable_legacy_endpoint: - nbapp.web_app.add_handlers( - ".*", [(url_path_join(base_url, "/metrics"), ApiHandler)] - ) - nbapp.web_app.add_handlers( ".*", [(url_path_join(base_url, "/api/metrics/v1"), ApiHandler)] ) diff --git a/jupyter_resource_usage/config.py b/jupyter_resource_usage/config.py index 847ad96..0c58ce9 100644 --- a/jupyter_resource_usage/config.py +++ b/jupyter_resource_usage/config.py @@ -37,16 +37,6 @@ class ResourceUseDisplay(Configurable): Holds server-side configuration for jupyter-resource-usage """ - disable_legacy_endpoint = Bool( - True, - help=""" - Disable legacy /metrics endpoint - - This prevents jupyter-resource-usage from shadowing the prometheus /metrics endpoint. - """, - config=True, - ) - process_memory_metrics = List( trait=PSUtilMetric(), default_value=[{"name": "memory_info", "attribute": "rss"}],