simpler custom spawn bucket sizes

for prometheus
This commit is contained in:
kireetb
2025-02-03 22:50:58 -05:00
parent e65b7c3c15
commit ee4a8e593d
2 changed files with 17 additions and 25 deletions

View File

@@ -33,6 +33,16 @@ export JUPYTERHUB_METRICS_PREFIX=jupyterhub_prod
would result in the metric `jupyterhub_prod_active_users`, etc.
## Customizing spawn bucket sizes
As of JupyterHub >= 5.2.1, override `JUPYTERHUB_SERVER_SPAWN_DURATION_SECONDS_BUCKETS` env variable in Hub's environment to allow custom bucket sizes. Otherwise default to, [0.5, 1, 2.5, 5, 10, 15, 30, 60, 120, 180, 300, 600, float("inf")]
For example,
```bash
export JUPYTERHUB_SERVER_SPAWN_DURATION_SECONDS_BUCKETS="1,2,4,6,12,30,60,120"
```
## Configuring metrics
```{eval-rst}