canonical / canonical/notebook-operators
Metrics for `notebook_create_total` and `notebook_running` are flipped
- Dominant language
- Python
- Stars
- 6
- Forks
- 12
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 12
Description
### Bug Description
Metrics for `notebook_create_total` and `notebook_running` are flipped.
I have 4 notebooks created and 2 running yet the `notebook_create_total` reports 2 and `notebook_running` reports 4.
```console
root@jupyter-controller-0:/var/lib/juju# curl -s localhost:8080/metrics | grep -i notebook_ | grep -Ei "create|running" | grep -v ^#
notebook_create_total{namespace="admin"} 2
notebook_running{namespace="admin"} 4
```

### To Reproduce
N/A
### Environment
CKF 1.8/stable (jupyter controller: `1.8/stable` , `824`)
Microk8s 1.24/stable
juju 3.1.6
### Relevant Log Output
```shell
N/A
```
### Additional Context
_No response_
Contributor guide
Research direction
Start by locating where the notebook_create_total and notebook_running metrics are defined and populated in the repository. Compare those paths with the reported notebook counts, then verify that the metrics output assigns each name to the correct value for created and running notebooks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100