Skip to content

Commit

Permalink
ddl: add TiDB version to metrics (#7902)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and winoros committed Oct 18, 2018
1 parent 1d3bb7b commit 54b526a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,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
}
Expand Down
2 changes: 1 addition & 1 deletion metrics/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 54b526a

Please sign in to comment.