-
Notifications
You must be signed in to change notification settings - Fork 229
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
fix(cosmos-vstorage): split 'size_delta' counter into 'size_increase' and 'size_decrease' #11063
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good, but blocking until we have test coverage.
Deploying agoric-sdk with
|
Latest commit: |
513ee68
|
Status: | ✅ Deploy successful! |
Preview URL: | https://f715145d.agoric-sdk.pages.dev |
Branch Preview URL: | https://sliakh-11062-agd-panic-vstor.agoric-sdk.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unblocking per the recorded manual testing and with the expectation of automated testing in a followup.
I'd like to have this merged to get |
const MetricLabelStoreKey = "storeKey" | ||
|
||
func NewMetricsLabels(k Keeper) []metrics.Label { | ||
return []metrics.Label{ | ||
func ReportStoreSizeMetrics(k Keeper, sizeDelta float32) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make this a method on the Keeper?
func ReportStoreSizeMetrics(k Keeper, sizeDelta float32) { | |
// ReportStoreSizeMetrics exports sizeDelta metrics when | |
// Cosmos telemetry is enabled. | |
func (k Keeper) ReportStoreSizeMetrics(sizeDelta float32) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're reporting 2 separate metrics, I would have preferred reporting a down of the current size and an up of the new size instead of a single up/down depending on the direction of the change. That gives us a little more information.
if sizeDelta >= 0 { | ||
telemetry.IncrCounterWithLabels(MetricKeyStoreSizeIncrease, sizeDelta, metricsLabel) | ||
} else { | ||
telemetry.IncrCounterWithLabels(MetricKeyStoreSizeDecrese, -sizeDelta, metricsLabel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
telemetry.IncrCounterWithLabels(MetricKeyStoreSizeDecrese, -sizeDelta, metricsLabel) | |
telemetry.IncrCounterWithLabels(MetricKeyStoreSizeDecrease, -sizeDelta, metricsLabel) |
refs: #11062
refs: #10938
Description
Despite testing,
telemetry.IncrCounterWithLabels()
appears to only accept non-negative numbers. As a workaround, we will be reporting vstorage size increase and decrease as two separate counters.Security Considerations
N/A
Scaling Considerations
One extra metric not an issue as long as number of keeper instances is low.
Documentation Considerations
New metrics:
Testing Considerations
Manual Testing; Automated testing will be submitted as a separate PR.
First terminal:
Second terminal (after Block 17)
Third terminal (start before Block 17):
Upgrade Considerations
N/A