Skip to content

[TEMP] Adding metrics - #2324

Open
yashnevatia wants to merge 4 commits into
mainfrom
ackEvent-slow-investigation
Open

[TEMP] Adding metrics#2324
yashnevatia wants to merge 4 commits into
mainfrom
ackEvent-slow-investigation

Conversation

@yashnevatia

Copy link
Copy Markdown
Contributor

Requires

Supports

Copilot AI lite review requested due to automatic review settings August 18, 2026 10:51
@yashnevatia
yashnevatia requested a review from a team as a code owner August 18, 2026 10:51
@github-actions

Copy link
Copy Markdown
Contributor

👋 yashnevatia, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (4)

pkg/capabilities.BaseTriggerMetrics (4)
  • ObserveMuWait — ➕ Added

  • ObserveScanPendingLockHeld — ➕ Added

  • ObserveStoreOp — ➕ Added

  • SetPreAckedEntries — ➕ Added

✅ Compatible Changes (4)

pkg/capabilities.(*BaseTriggerBeholderMetrics) (4)
  • ObserveMuWait — ➕ Added

  • ObserveScanPendingLockHeld — ➕ Added

  • ObserveStoreOp — ➕ Added

  • SetPreAckedEntries — ➕ Added


📄 View full apidiff report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds additional telemetry to BaseTriggerCapability to help diagnose lock contention and EventStore latency, improving observability of trigger delivery/ACK behavior.

Changes:

  • Added mutex wait/lock-hold metrics (including per-operation labels) around b.mu acquisition and the scanPending loop.
  • Added EventStore operation latency metrics (with op and outcome labels) around store calls like List, Insert, DeleteEvent, UpdateDelivery.
  • Extended BaseTrigger metrics implementations (Beholder + noop) to support the new instruments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
pkg/capabilities/base_trigger.go Adds lock contention + store operation instrumentation around key trigger/ACK/retransmit/prune paths.
pkg/capabilities/base_trigger_metrics.go Adds new Beholder metrics instruments and implements new BaseTriggerMetrics methods (plus noop updates).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/capabilities/base_trigger.go
Comment on lines +642 to +645
b.lockMu(muOpScanPending)
lockedAt := time.Now()

b.expirePreAcked(now)
preAckedRemaining := b.expirePreAcked(now)
Comment thread pkg/capabilities/base_trigger_metrics.go Outdated
yashnevatia and others added 3 commits August 18, 2026 12:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yashnevatia yashnevatia changed the title Adding metrics [TEMP] Adding metrics Aug 20, 2026
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.

2 participants