From 9df619c5a02cf6a4ff0e039d15cd9dc351146ff7 Mon Sep 17 00:00:00 2001 From: Lynn Date: Mon, 15 Oct 2018 15:11:45 +0800 Subject: [PATCH] ddl: add TiDB version to metrics --- ddl/ddl.go | 2 +- metrics/ddl.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ddl/ddl.go b/ddl/ddl.go index ce00d89adc829..753bee847c5ee 100644 --- a/ddl/ddl.go +++ b/ddl/ddl.go @@ -261,7 +261,7 @@ func (dc *ddlCtx) isOwner() bool { isOwner := dc.ownerManager.IsOwner() log.Debugf("[ddl] it's the DDL owner %v, self ID %s", isOwner, dc.uuid) if isOwner { - metrics.DDLCounter.WithLabelValues(metrics.IsDDLOwner).Inc() + metrics.DDLCounter.WithLabelValues(metrics.DDLOwner + "_" + mysql.TiDBReleaseVersion).Inc() } return isOwner } diff --git a/metrics/ddl.go b/metrics/ddl.go index b08911b693514..6790e2a52ae13 100644 --- a/metrics/ddl.go +++ b/metrics/ddl.go @@ -93,7 +93,7 @@ var ( CreateDDLInstance = "create_ddl_instance" CreateDDL = "create_ddl" - IsDDLOwner = "is_ddl_owner" + DDLOwner = "owner" DDLCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "tidb",