Skip to content

Commit

Permalink
ddl: add TiDB version to metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala committed Oct 16, 2018
1 parent 48704b8 commit 9df619c
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 @@ -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
}
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 9df619c

Please sign in to comment.