Hello,
I would like to find out how many unique users have used JupyterHub over a certain period of time. I noticed something that I can’t explain. At what point is a user considered “active” so that they are listed in jupyterhub_active_users in the metrics?
As far as I can see, the user’s last_activity is an important factor in this. Simply logging in does not seem to be enough. At the latest when a profile is started, the user is recognized as “active.” Perhaps it’s because I’m using a custom authenticator and have overwritten something without realizing it, or is there something else to consider?
Thank you all
1 Like
Active users are estimated based on last_activity. Here is the relevant code that counts the number of users in DB based on their last activity. A custom authenticator should not effect this. Can you please explain what exactly you observe with jupyterhub_active_users?
It seemed to me that users who only log in and do not start a profile are not counted as active users. I took another look at the dashboard and realized that I had simply overlooked the fact that these users are indeed shown as active. However, this happens with a delay, which is why I didn’t notice it at first. Thank you for the code snippet, it’s very helpful.
1 Like