Add provider label to block_receipt_delay_seconds histogram - #391
Open
AntiD2ta wants to merge 1 commit into
Open
Add provider label to block_receipt_delay_seconds histogram#391AntiD2ta wants to merge 1 commit into
AntiD2ta wants to merge 1 commit into
Conversation
Add a `provider` label to the `vouch_block_receipt_delay_seconds` histogram so operators can identify which beacon node delivered the head event. The address is obtained at event time via a type assertion on the events provider to eth2client.Service, which the multi-client satisfies — ensuring the label reflects the currently active client even after failovers.
Bez625
requested changes
Mar 25, 2026
| monitorBlockDelay(uint(uint64(data.Slot)%s.slotsPerEpoch), time.Since(s.chainTimeService.StartOfSlot(data.Slot))) | ||
| var provider string | ||
| if svc, ok := s.eventsProvider.(eth2client.Service); ok { | ||
| provider = svc.Address() |
Contributor
There was a problem hiding this comment.
I'm pretty convinced this will not work as expected. If you take a look here, the multi-client only returns the first active client in the array.
I think this might require work in go-eth2-client to pass back the provider in the head event data struct. This should tell us the actual provider that sent the event.
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.
Summary
providerlabel to thevouch_block_receipt_delay_secondshistogram, identifying which beacon node delivered the head eventeth2client.Service, so it reflects the currently active client even after failoversTest plan
go build ./...compiles cleanlygo test ./services/controller/standard/...— all 29 tests pass (including 2 new)golangci-lint run— no new issuesvouch_block_receipt_delay_seconds_bucketand confirmproviderlabel appears