Skip to content

feat: head reporter metrics via beholder metrics - #23250

Merged
makramkd merged 4 commits into
developfrom
mk/CCIP-12500
Aug 3, 2026
Merged

feat: head reporter metrics via beholder metrics#23250
makramkd merged 4 commits into
developfrom
mk/CCIP-12500

Conversation

@makramkd

@makramkd makramkd commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Part of the OTI deprecation story https://smartcontract-it.atlassian.net/browse/CCIP-12500

Adds two new HeadReporter implementations that emit head/finality data as Beholder OTel metrics (via beholder.GetMeter()), alongside the existing OTI-based reporters:

  • evmMetricsReporter — event-driven, in-process EVM chains (mirrors legacyEVMTelemetryReporter).
  • relayerMetricsReporter — periodic poll over LOOP relayers, e.g. Solana/Aptos (mirrors loopTelemetryReporter).

Reasoning: evmMetricsReporter and relayerMetricsReporter mirror the existing legacyEVMTelemetryReporter/loopTelemetryReporter split: EVM has a real HeadTracker subscription (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 HeadMetrics sink (beholderHeadMetrics) that registers 5 Int64Gauge instruments once at construction.

Wired into application.go alongside the existing reporters; if NewBeholderHeadMetrics() 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 OTel ManualReader to verify actual gauge values/attributes end to end.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Comment thread core/services/headreporter/metrics_reporter.go Dismissed
Comment thread core/services/headreporter/metrics_reporter.go Dismissed
Comment thread core/services/headreporter/beholder_metrics.go Outdated
Comment thread core/services/headreporter/beholder_metrics.go Outdated

// evmMetricsReporter records head/finality data for in-process EVM chains as Beholder metrics,
// driven by HeadTracker's new-head events.
type evmMetricsReporter struct {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should Beholder be in the name somewhere?

Comment thread core/services/headreporter/metrics_reporter.go
@trunk-io

trunk-io Bot commented Jul 28, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_CCIP_Messaging_Sui2EVM_Success/Message_to_EVM The test is waiting for a commit report event that never arrives, causing it to time out. Logs ↗︎
Test_CCIP_Messaging_Sui2EVM_Success The test failed without a specific error message, likely due to an unspecified failure in the test execution or environment. Logs ↗︎

View Full Report ↗︎Docs

@makramkd
makramkd marked this pull request as ready for review July 30, 2026 08:34
@makramkd
makramkd requested review from a team as code owners July 30, 2026 08:34
@mchain0

mchain0 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

major change with some risks - I think it would be good to run this branch with LOCAL CRE and see if everything works as expected

@cl-sonarqube-production

Copy link
Copy Markdown

@makramkd

makramkd commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Verified on staging as well @mchain0 🚀

@makramkd
makramkd added this pull request to the merge queue Aug 3, 2026
Merged via the queue into develop with commit 1543766 Aug 3, 2026
217 of 219 checks passed
@makramkd
makramkd deleted the mk/CCIP-12500 branch August 3, 2026 12:00
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.

4 participants