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

feat(auctioneer): add metrics #1953

Open
wants to merge 7 commits into
base: ENG-824/auctioneer
Choose a base branch
from

Conversation

SuperFluffy
Copy link
Member

Summary

Extend Auctioneer by a first set of metrics.

Background

Astria services must be observable, metrics are low hanging fruit.

Changes

  • Added metrics (see metrics section below for a list).

Testing

This needs to be observed on a telemetry platform.

Changelogs

Changelogs updated.

Metrics

  • astria_auctioneer_executed_blocks_received: counter
  • astria_auctioneer_optimistic_blocks_received: coubter
  • astria_auctioneer_auctions_cancelled: coubter
  • astria_auctioneer_auctions_submitted: counter
  • astria_auctioneer_auction_bids_processed: gauge (labels "processed" and "dropped")
  • astria_auctioneer_auction_bids_received: counter

Related Issues

closes #1915

@SuperFluffy SuperFluffy added observability observability, tracing, metrics auctioneer labels Feb 6, 2025
@SuperFluffy SuperFluffy marked this pull request as ready for review February 6, 2025 14:24
@SuperFluffy SuperFluffy requested a review from a team as a code owner February 6, 2025 14:24
@SuperFluffy SuperFluffy requested a review from noot February 6, 2025 14:24
OPTIMISTIC_BLOCKS_RECEIVED,
AUCTIONS_CANCELLED,
AUCTIONS_SUBMITTED,
AUCTION_BIDS_PROCESSED,
Copy link
Member Author

@SuperFluffy SuperFluffy Feb 6, 2025

Choose a reason for hiding this comment

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

I am not happy with this name - I want to have a gauge with 2 labels: bids admitted and bids dropped. "processed" seems confusing. Are there better names?

Copy link
Contributor

Choose a reason for hiding this comment

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

lets make the bids received and dropped a histogram.

Copy link
Member Author

Choose a reason for hiding this comment

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

See my other comment in #1953 (comment), copied here:

The distinction is important actually (received is processed + dropped), but I did change the nomenclature in 27af6c1 (now the histogram is just "auction_bids" with labels ["processed", "dropped"]).

@@ -272,6 +283,9 @@ impl Auctioneer {
"block_hash",
field::display(executed_block.sequencer_block_hash()),
);

self.metrics.increment_executed_blocks_received_counter();
Copy link
Contributor

Choose a reason for hiding this comment

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

this can act as a proxy for the metric "number of auctions conducted" since an auction starts when the auctioneer receives an executed block.

RegisteringBuilder,
},
};

pub struct Metrics {}
const AUCTION_BIDS_PROCESSED_LABEL: &str = "auction_bids_processed";
const AUCTION_BIDS_PROCESSED_ADMITTED: &str = "admitted";
Copy link
Contributor

@bharath-123 bharath-123 Feb 6, 2025

Choose a reason for hiding this comment

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

i feel like received is a better word than admitted.

Copy link
Member Author

Choose a reason for hiding this comment

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

The distinction is important actually (received is processed + dropped), but I did change the nomenclature in 27af6c1 (now the histogram is just "auction_bids" with labels ["processed", "dropped"]).

@bharath-123
Copy link
Contributor

Some metrics to add and feedback:

  1. A histogram of the winning bid amounts in the auction. It will allow us to understand how much people are bidding
  2. update bids_admitted and bids_dropped to be a histogram so that we can visualize how many bids we get per auction. it is useful to assess demand for our TOB.

self.auction_winning_bid_histogram.record(val);
}

pub(crate) fn record_auction_winner_submission_error_latency(&self, val: impl IntoF64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we also might want the number of times submission has error'ed out. We could use this for an alert to indicate when auctioneer has a high submission error rate which is something actionable?

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't that covered by the same histogram with the "error" label (see the method just below this one)?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, the histogram metric will return a total count too. so that should cover it!

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

Successfully merging this pull request may close these issues.

2 participants