From 4bf10097acec931f90a4a9b93ee096f54e52d5fc Mon Sep 17 00:00:00 2001 From: David De Leon <56207066+davidadeleon@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:36:14 -0500 Subject: [PATCH 1/3] Converting raft time metrics to Milliseconds over Default Nanoseconds to maintain consistency --- physical/raft/raft.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physical/raft/raft.go b/physical/raft/raft.go index 2b2de78ac76..41138dd80d0 100644 --- a/physical/raft/raft.go +++ b/physical/raft/raft.go @@ -509,12 +509,12 @@ func (b *RaftBackend) collectMetricsWithStats(stats bolt.Stats, sink *metricsuti sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "node", "count"}, float32(txstats.NodeCount), labels) sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "node", "dereferences"}, float32(txstats.NodeDeref), labels) sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "rebalance", "count"}, float32(txstats.Rebalance), labels) - sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "rebalance", "time"}, float32(txstats.RebalanceTime), labels) + sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "rebalance", "time"}, float32(txstats.RebalanceTime.Milliseconds()), labels) sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "split", "count"}, float32(txstats.Split), labels) sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "spill", "count"}, float32(txstats.Spill), labels) - sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "spill", "time"}, float32(txstats.SpillTime), labels) + sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "spill", "time"}, float32(txstats.SpillTime.Milliseconds()), labels) sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "write", "count"}, float32(txstats.Write), labels) - sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "write", "time"}, float32(txstats.WriteTime), labels) + sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "write", "time"}, float32(txstats.WriteTime.Milliseconds()), labels) } // RaftServer has information about a server in the Raft configuration From 9c8f189bc87a1a8e2ad37988fbc60eeee2db087c Mon Sep 17 00:00:00 2001 From: davidadeleon <56207066+davidadeleon@users.noreply.github.com> Date: Mon, 24 Jan 2022 08:59:40 -0500 Subject: [PATCH 2/3] Create changelog entry --- changelog/13749.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/13749.txt diff --git a/changelog/13749.txt b/changelog/13749.txt new file mode 100644 index 00000000000..d92c23c864f --- /dev/null +++ b/changelog/13749.txt @@ -0,0 +1,3 @@ +```release-note:bug +physical/raft: Fix units being reported for bolt metrics from nanoseconds to milliseconds +``` From 7dedd79acefccdf5ab1cf4d743e5523af5fb1b2a Mon Sep 17 00:00:00 2001 From: davidadeleon <56207066+davidadeleon@users.noreply.github.com> Date: Mon, 24 Jan 2022 10:42:51 -0500 Subject: [PATCH 3/3] Update changelog/13749.txt Updating change description Co-authored-by: Nick Cabatoff --- changelog/13749.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/13749.txt b/changelog/13749.txt index d92c23c864f..f76079925fb 100644 --- a/changelog/13749.txt +++ b/changelog/13749.txt @@ -1,3 +1,3 @@ ```release-note:bug -physical/raft: Fix units being reported for bolt metrics from nanoseconds to milliseconds +storage/raft: Units for bolt metrics now given in milliseconds instead of nanoseconds ```