Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
register / remove metrics of dumpling
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 committed Dec 31, 2020
1 parent 5f55bf3 commit 1f24a99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dumpling/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package dumpling

import (
"github.com/pingcap/dumpling/v4/export"
"github.com/prometheus/client_golang/prometheus"

"github.com/pingcap/dm/pkg/metricsproxy"
Expand All @@ -33,8 +34,10 @@ var (
// RegisterMetrics registers metrics.
func RegisterMetrics(registry *prometheus.Registry) {
registry.MustRegister(dumplingExitWithErrorCounter)
export.RegisterMetrics(registry)
}

func (m *Dumpling) removeLabelValuesWithTaskInMetrics(task string) {
dumplingExitWithErrorCounter.DeleteAllAboutLabels(prometheus.Labels{"task": task})
export.RemoveLabelValuesWithTaskInMetrics(prometheus.Labels{"task": task})
}

0 comments on commit 1f24a99

Please sign in to comment.