fsm label batch_deregister_node metrics explicitly

Co-Authored-By: Mahmood Ali <mahmood@notnoop.com>
This commit is contained in:
Lang Martin 2019-06-26 10:44:56 -04:00 committed by Lang Martin
parent 909f3b0534
commit 1cc6b4062c

View file

@ -307,7 +307,7 @@ func (n *nomadFSM) applyDeregisterNode(buf []byte, index uint64) interface{} {
} }
func (n *nomadFSM) applyDeregisterNodeBatch(buf []byte, index uint64) interface{} { func (n *nomadFSM) applyDeregisterNodeBatch(buf []byte, index uint64) interface{} {
defer metrics.MeasureSince([]string{"nomad", "fsm", "deregister_node"}, time.Now()) defer metrics.MeasureSince([]string{"nomad", "fsm", "batch_deregister_node"}, time.Now())
var req structs.NodeDeregisterBatchRequest var req structs.NodeDeregisterBatchRequest
if err := structs.Decode(buf, &req); err != nil { if err := structs.Decode(buf, &req); err != nil {
panic(fmt.Errorf("failed to decode request: %v", err)) panic(fmt.Errorf("failed to decode request: %v", err))