Add latency metrics to assembler#992
Open
moradna wants to merge 1 commit into
Open
Conversation
Signed-off-by: Natalie Morad <natalie.morad@ibm.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Assembler’s observability by adding histogram-based latency metrics around key batch-processing stages (fetching batches, waiting for batches after attestations, and appending batches to the ledger), and wires those metrics through the Assembler components and documentation.
Changes:
- Add three new Assembler histogram metrics: batch fetch latency, BA→batch availability latency, and batch ledger append latency.
- Instrument
PrefetcherandCollatorto observe the new latency metrics at the relevant points in the processing flow. - Update unit tests/benchmarks and the metrics documentation to reflect the new metrics and constructor signatures.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| node/assembler/prefetcher.go | Injects Metrics into the Prefetcher and records batch fetch latency observations. |
| node/assembler/prefetcher_test.go | Updates Prefetcher tests to construct and pass Assembler metrics. |
| node/assembler/prefetch_benchmark/prefetch_benchmark_test.go | Updates benchmark setup to construct and pass Assembler metrics. |
| node/assembler/mocks/prefetcher_factory.go | Regenerates/updates the PrefetcherFactory fake to include the new Metrics parameter. |
| node/assembler/metrics.go | Defines new histogram metrics, initializes them, and includes their averages in periodic/stop logging. |
| node/assembler/collator.go | Records BA→batch latency and batch ledger append latency around the corresponding operations. |
| node/assembler/collator_test.go | Updates Collator test construction to include Metrics. |
| node/assembler/assembler.go | Wires Assembler metrics into the PrefetcherFactory and Collator initialization. |
| node/assembler/assembler_test.go | Updates the PrefetcherFactory mock callback signature to include Metrics. |
| docs/monitoring/metrics.md | Documents the three new Assembler latency metrics and fixes a minor formatting inconsistency. |
Files not reviewed (1)
- node/assembler/mocks/prefetcher_factory.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#414