-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Batch 2] Notebook PR Ports. #97
Conversation
`exporter_map` is deprecated, so let's use the list of exporters fetched from the installed entrypoints. There's a supposed attribute `export_from_notebook` that should be set to a friendly string name if the exporter should be exposed in the front-end. However, the exporters defined in `nbconvert` don't have it set, so I haven't used it to determine inclusion in the list. Instead, I've used the entrypoint name as the friendly name, which looks like it was the intention from the way they are named. I ran the unit tests and tried starting up the notebook server and accessing the API endpoint to verify the JSON looked correct.
Although I'm unable to reproduce the issue, its a safe change to prevent an AttributeError from occuring ('NoneType' object has no attribute 'close'). The user that reported this is attempting to launch a kernel and I believe the launch only partially completed such that `kernel._activity_stream` did not get established. (This occurred from Jupyter Enterprise Gateway where we deal with remote kernel launches across resource-managed clusters, so things are a bit more involved relative to kernel establishment.)
It's still (IMHO) unclear how the adaptation goes. Like does "adapting to protocol X.Y.Z." mean the end-result is X.Y.Z or what you got is X.Y.Z and it's X.Y.W after adaptation.
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.
No cleanup necessary. |
@@ -1,18 +1,5 @@ | |||
""" | |||
Prometheus metrics exported by Jupyter Notebook Server | |||
from ..prometheus.metrics import HTTP_REQUEST_DURATION_SECONDS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it really be a ..
here?
@@ -0,0 +1,24 @@ | |||
from notebook.prometheus.metrics import HTTP_REQUEST_DURATION_SECONDS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notebook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #98.
@@ -26,6 +26,8 @@ | |||
from jupyter_server._tz import utcnow, isoformat | |||
from ipython_genutils.py3compat import getcwd | |||
|
|||
from notebook.prometheus.metrics import KERNEL_CURRENTLY_RUNNING_TOTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notebook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* make provisioner ip configurable * bump version
Don't merge without reading Issue 96