Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bolt.write.time should actually be a counter, not a gauge #22468

Merged
merged 5 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/22468.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core/metrics: vault.raft_storage.bolt.write.time should be a counter not a summary
raskchanky marked this conversation as resolved.
Show resolved Hide resolved
```
2 changes: 1 addition & 1 deletion physical/raft/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ func (b *RaftBackend) collectMetricsWithStats(stats bolt.Stats, sink *metricsuti
sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "spill", "count"}, float32(txstats.GetSpill()), labels)
sink.AddSampleWithLabels([]string{"raft_storage", "bolt", "spill", "time"}, float32(txstats.GetSpillTime().Milliseconds()), labels)
sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "write", "count"}, float32(txstats.GetWrite()), labels)
sink.SetGaugeWithLabels([]string{"raft_storage", "bolt", "write", "time"}, float32(txstats.GetWriteTime().Milliseconds()), labels)
sink.IncrCounterWithLabels([]string{"raft_storage", "bolt", "write", "time"}, float32(txstats.GetWriteTime().Milliseconds()), labels)
}

// RaftServer has information about a server in the Raft configuration
Expand Down
3 changes: 2 additions & 1 deletion website/content/docs/upgrading/upgrade-to-1.14.x.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Official images separately.

## Important changes

There are no major changes to announce at this time.
`vault.raft_storage.bolt.write.time` has been corrected from a summary to a counter to more accurately reflect that it
is measuring cumulative time writing, and not the distribution of individual write times.

## Known issues and workarounds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Metric type | Value | Description
----------- | ----- | -----------
gauge | ms | Total time the Bolt database has spent writing to disk
counter | ms | Total cumulative time the Bolt database has spent writing to disk.