mirror of https://github.com/status-im/consul.git
add entries for missing fsm operations and mark duplicated metrics prefixes as deprecated
This commit is contained in:
parent
c6b29a8bba
commit
fcec25de40
|
@ -53,43 +53,43 @@ var CommandsSummaries = []prometheus.SummaryDefinition{
|
|||
},
|
||||
{
|
||||
Name: []string{"consul", "fsm", "intention"},
|
||||
Help: "",
|
||||
Help: "Deprecated - use fsm_intention instead",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "intention"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an intention operation to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"consul", "fsm", "ca"},
|
||||
Help: "",
|
||||
Help: "Deprecated - use fsm_ca instead",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "ca"},
|
||||
Help: "Measures the time it takes to apply CA configuration operations to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "ca", "leaf"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an operation while signing a leaf certificate.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "acl", "token"},
|
||||
Help: "",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "ca", "leaf"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an ACL token operation to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "acl", "policy"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an ACL policy operation to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "acl", "bindingrule"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an ACL binding rule operation to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "acl", "authmethod"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply an ACL authmethod operation to the FSM.",
|
||||
},
|
||||
{
|
||||
Name: []string{"fsm", "system_metadata"},
|
||||
Help: "",
|
||||
Help: "Measures the time it takes to apply a system metadata operation to the FSM.",
|
||||
},
|
||||
// TODO(kit): We generate the config-entry fsm summaries by reading off of the request. It is
|
||||
// possible to statically declare these when we know all of the names, but I didn't get to it
|
||||
|
@ -378,8 +378,12 @@ func (c *FSM) applyIntentionOperation(buf []byte, index uint64) interface{} {
|
|||
panic(fmt.Errorf("failed to decode request: %v", err))
|
||||
}
|
||||
|
||||
// TODO(kit): We should deprecate this first metric that writes the metrics_prefix itself,
|
||||
// the config we use to flag this out, telemetry.disable_compat_1.9 is on the agent - how do
|
||||
// we access it here?
|
||||
defer metrics.MeasureSinceWithLabels([]string{"consul", "fsm", "intention"}, time.Now(),
|
||||
[]metrics.Label{{Name: "op", Value: string(req.Op)}})
|
||||
|
||||
defer metrics.MeasureSinceWithLabels([]string{"fsm", "intention"}, time.Now(),
|
||||
[]metrics.Label{{Name: "op", Value: string(req.Op)}})
|
||||
|
||||
|
@ -474,6 +478,7 @@ func (c *FSM) applyConnectCAOperation(buf []byte, index uint64) interface{} {
|
|||
}
|
||||
}
|
||||
|
||||
// applyConnectCALeafOperation applies an operation while signing a leaf certificate.
|
||||
func (c *FSM) applyConnectCALeafOperation(buf []byte, index uint64) interface{} {
|
||||
var req structs.CALeafRequest
|
||||
if err := structs.Decode(buf, &req); err != nil {
|
||||
|
|
|
@ -243,6 +243,14 @@ These metrics are used to monitor the health of the Consul servers.
|
|||
| `consul.fsm.txn` | This measures the time it takes to apply the given transaction update to the FSM. | ms | timer |
|
||||
| `consul.fsm.autopilot` | This measures the time it takes to apply the given autopilot update to the FSM. | ms | timer |
|
||||
| `consul.fsm.persist` | This measures the time it takes to persist the FSM to a raft snapshot. | ms | timer |
|
||||
| `consul.fsm.intention` | Measures the time it takes to apply an intention operation to the state store. | ms | timer |
|
||||
| `consul.fsm.ca` | Measures the time it takes to apply CA configuration operations to the FSM. | ms | timer |
|
||||
| `consul.fsm.ca.leaf` | Measures the time it takes to apply an operation while signing a leaf certificate. | ms | timer |
|
||||
| `consul.fsm.acl.token` | Measures the time it takes to apply an ACL token operation to the FSM. | ms | timer |
|
||||
| `consul.fsm.acl.policy` | Measures the time it takes to apply an ACL policy operation to the FSM. | ms | timer |
|
||||
| `consul.fsm.acl.bindingrule` | Measures the time it takes to apply an ACL binding rule operation to the FSM. | ms | timer |
|
||||
| `consul.fsm.acl.authmethod` | Measures the time it takes to apply an ACL authmethod operation to the FSM. | ms | timer |
|
||||
| `consul.fsm.system_metadata` | Measures the time it takes to apply a system metadata operation to the FSM. | ms | timer |
|
||||
| `consul.kvs.apply` | This measures the time it takes to complete an update to the KV store. | ms | timer |
|
||||
| `consul.leader.barrier` | This measures the time spent waiting for the raft barrier upon gaining leadership. | ms | timer |
|
||||
| `consul.leader.reconcile` | This measures the time spent updating the raft store from the serf member information. | ms | timer |
|
||||
|
|
Loading…
Reference in New Issue