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

chore(bridge-withdrawer): accumulating counter instead of guage for settled value #1814

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joroshiba
Copy link
Member

Summary

Replaces the guage metric batch_total_settled_value with the counter metric accumulated_settled_value

Background

The guage metric was not useful because we were not capturing the guage at each packet time, it was most likely going to always be zero. Instead replace with a counter which we can run a rate on to see the total amount of flow out. Because this is strictly increasing we aren't subject to different outputs with different scraping intervals.

Changes

  • remove batch_total_settled_value and replace with accumulated_settled_value

Testing

How are these changes tested?

Changelogs

Changelogs updated

Metrics

  • Remove batch_total_settled_value
  • Added accumulated_settled_value metric

Breaking Changelist

This is technically speaking a breaking change on the metric interface, however the existing metric never worked, so I wouldn't consider truly breaking.

@joroshiba joroshiba marked this pull request as ready for review November 18, 2024 02:10
@joroshiba joroshiba requested a review from a team as a code owner November 18, 2024 02:10
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- New `accumulateded_settled_value` metric which tracks total settled since startup [#1814](https://github.com/astriaorg/astria/pull/1814)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- New `accumulateded_settled_value` metric which tracks total settled since startup [#1814](https://github.com/astriaorg/astria/pull/1814)
- New `accumulated_settled_value` metric which tracks total settled since startup [#1814](https://github.com/astriaorg/astria/pull/1814)

BATCH_TOTAL_SETTLED_VALUE,
"Total value of withdrawals settled in a given sequencer block",
ACCUMULATED_SETTLED_VALUE,
"Total value of withdrawals settled over time from batches",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to include the units used here. Also maybe worth replacing _VALUE in the metric name with the units too (or appending it to the name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants