Skip to content

Commit

Permalink
Don't repeat extension name in metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Nov 4, 2024
1 parent 3bb172a commit 36e8ad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jupyter_server/prometheus/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# New prometheus metrics that do not exist in notebook v6 go here
SERVER_INFO = Info("jupyter_server", "Jupyter Server Version information")
SERVER_EXTENSION_INFO = Info("jupyter_server_extension", "Jupyter Server Extensiom Version Information", ["extension_name", "package_name", "version", "enabled"])
SERVER_EXTENSION_INFO = Info("jupyter_server_extension", "Jupyter Server Extensiom Version Information", ["name", "version", "enabled"])

__all__ = [
"HTTP_REQUEST_DURATION_SECONDS",
Expand Down
3 changes: 1 addition & 2 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2705,8 +2705,7 @@ def init_metrics(self) -> None:

for k, ext in self.extension_manager.extensions.items():
SERVER_EXTENSION_INFO.labels(
package_name=k,
extension_name=ext.name,
name=ext.name,
version=ext.version,
enabled=str(ext.enabled).lower()
)
Expand Down

0 comments on commit 36e8ad6

Please sign in to comment.