-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved the 'metrics' file to a new package named 'promethues'.
Then split the file into two files, one containing the metrics themselves, the other containing any function that have something to do with prometheus. Finally, Added new metrics into the prometheus.metrics file that represent the number of running terminals and added the functionality for that metric to be recorded in the terminal.api_handlers file.
- Loading branch information
Showing
5 changed files
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Prometheus metrics exported by Jupyter Notebook Server | ||
Read https://prometheus.io/docs/practices/naming/ for naming | ||
conventions for metrics & labels. | ||
""" | ||
|
||
|
||
from prometheus_client import Histogram, Gauge | ||
|
||
|
||
HTTP_REQUEST_DURATION_SECONDS = Histogram( | ||
'http_request_duration_seconds', | ||
'duration in seconds for all HTTP requests', | ||
['method', 'handler', 'status_code'], | ||
) | ||
|
||
TERMINAL_CURRENTLY_RUNNING_TOTAL = Gauge( | ||
'terminal_currently_running_total', | ||
'counter for how many terminals are running', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters