Jupyterlab Kernel Name

Hi, I am trying to analyze the jupyterhub logs to sort kernels through their names. I was using the kernel_name from the url. Unfortunately, this only works for Jupyter notebooks. For jupyter lab, we have something like this:

/kernelspecs?123456 which change randomly.

Is there a way to have the name of the started kernel in jupyterlab?

Thank you in advance.

S.

That’s the request from JupyterLab to retreive the kernel specs from the server api, with a cache-busting argument to make sure we are getting the most recent update.

I’m not sure exactly what you are doing here. Did you want a different server request? What was the corresponding url from the classic notebook logs?

Thanks @jasongrout for your reply. In classic jupyter notebooks, the url is like this:

Untitled.ipynb?kernel_name=anaconda3_bleeding

I am using this information to analyze the use of each kernel by name. This (I assume) not possible with jupyterlab. This can only be found in user notebook log file as Kernel args: {'kernel_name': 'xxx', 'cwd': 'xxx'} but not in jupyterhub log.

I hope it is clear to you now.