Skip to content

Commit

Permalink
fix: reset the current notebook_running metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Mo Zhou <weekenthralling@gmail.com>
  • Loading branch information
weekenthralling committed Aug 1, 2024
1 parent f6563b2 commit e16c012
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/notebook-controller/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func (m *Metrics) Collect(ch chan<- prometheus.Metric) {

// scrape gets current running notebook statefulsets.
func (m *Metrics) scrape() {
// Reset the current metrics to clear previous data
m.runningNotebooks.Reset()

stsList := &appsv1.StatefulSetList{}
err := m.cli.List(context.TODO(), stsList)
if err != nil {
Expand Down

0 comments on commit e16c012

Please sign in to comment.