canonical / canonical/notebook-operators

Metrics for `notebook_create_total` and `notebook_running` are flipped

Open
#324 0 comments 0 reactions 0 assignees View on GitHub
bug
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
```

![Screenshot from 2023-11-30 17-37-07](https://github.com/canonical/notebook-operators/assets/22921116/2393dea0-f82f-4f60-ae62-1c5790d7e01d)

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.