Skip to content
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

prometheus: Expose 3 activity metrics #1471

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

yuvipanda
Copy link
Contributor

This exposes some of the info from /api/status in the prometheus metrics endpoint, so they can be scraped over time and queried.

  • Server started timestamp, so we can easily see how long servers have been running
  • Last activity timestamp, so we can see when users were actually active
  • User activity duration (in seconds), so we can more easily build reports of how long users are actually active over time.

All these would be very helpful in JupyterHub environments.

Follow-up to #1470

This exposes some of the info from /api/status in the prometheus
metrics endpoint, so they can be scraped over time and queried.

- Server started timestamp, so we can easily see how long servers
  have been running
- Last activity timestamp, so we can see when users were actually
  active
- User activity duration (in seconds), so we can more easily build
  reports of how long users are actually active over time.

All these would be very helpful in JupyterHub environments.

Follow-up to jupyter-server#1470
@yuvipanda yuvipanda requested a review from Zsailer November 4, 2024 20:58
@Zsailer Zsailer merged commit d3a6c60 into jupyter-server:main Nov 4, 2024
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants