[TEMP] Adding metrics - #2324
Conversation
|
👋 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! |
|
There was a problem hiding this comment.
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.muacquisition and thescanPendingloop. - Added EventStore operation latency metrics (with
opandoutcomelabels) around store calls likeList,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.
| b.lockMu(muOpScanPending) | ||
| lockedAt := time.Now() | ||
|
|
||
| b.expirePreAcked(now) | ||
| preAckedRemaining := b.expirePreAcked(now) |
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>
Requires
Supports