feat: head reporter metrics via beholder metrics - #23250
Open
makramkd wants to merge 3 commits into
Open
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
Contributor
|
I see you updated files related to
|
makramkd
commented
Jul 28, 2026
|
|
||
| // evmMetricsReporter records head/finality data for in-process EVM chains as Beholder metrics, | ||
| // driven by HeadTracker's new-head events. | ||
| type evmMetricsReporter struct { |
Contributor
Author
There was a problem hiding this comment.
Should Beholder be in the name somewhere?
|
makramkd
marked this pull request as ready for review
July 30, 2026 08:34
product-security-plaid-production
Bot
requested review from
mchain0 and
pavel-raykov
July 30, 2026 08:34
bukata-sa
approved these changes
Jul 30, 2026
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.




What
Part of the OTI deprecation story https://smartcontract-it.atlassian.net/browse/CCIP-12500
Adds two new
HeadReporterimplementations that emit head/finality data as Beholder OTel metrics (viabeholder.GetMeter()), alongside the existing OTI-based reporters:evmMetricsReporter— event-driven, in-process EVM chains (mirrorslegacyEVMTelemetryReporter).relayerMetricsReporter— periodic poll over LOOP relayers, e.g. Solana/Aptos (mirrorsloopTelemetryReporter).Reasoning:
evmMetricsReporterandrelayerMetricsReportermirror the existinglegacyEVMTelemetryReporter/loopTelemetryReportersplit: EVM has a realHeadTrackersubscription (event-driven), while LOOP relayers (Solana/Aptos/etc.) have no in-process tracker and must be polled on the periodic tick.Both record via a shared
HeadMetricssink (beholderHeadMetrics) that registers 5Int64Gaugeinstruments once at construction.Wired into
application.goalongside the existing reporters; ifNewBeholderHeadMetrics()fails, we log and skip the metrics reporters rather than failing app startup.Testing
Unit tests for both reporters with a mocked
HeadMetrics, plus an instrument-level test using an OTelManualReaderto verify actual gauge values/attributes end to end.