Skip to content

Commit

Permalink
Added node class to tagged metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
burdandrei committed Mar 23, 2018
1 parent 1483675 commit 2b8cb3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,11 @@ func (c *Client) emitStats() {
// is ready
c.baseLabels = []metrics.Label{{Name: "node_id", Value: c.NodeID()}, {Name: "datacenter", Value: c.Datacenter()}}

// Add node_class if it's configured
if node := c.Node(); node.NodeClass != "" {
c.baseLabels = append(c.baseLabels, metrics.Label{Name: "node_class", Value: node.NodeClass})
}

// Start collecting host stats right away and then keep collecting every
// collection interval
next := time.NewTimer(0)
Expand Down

0 comments on commit 2b8cb3f

Please sign in to comment.