Vault capability advanced metrics#22354
Conversation
- Gate pending-queue reads in Observation and ValidateObservation when VaultForceEmptyOCRRounds is enabled; rename batch to currentPendingQueueItems and remove redundant GetPendingQueue call - Add VaultForceEmptyOCRRounds GateLimiter to reporting plugin config; Close() and test helper wiring - Resolve OCR plugin limits via BoundLimiter.Limit() in initializePluginLimits; extract helpers to plugin_utils.go (resolveVaultOCRBoundLimitInt, logging for forceEmptyOCRRounds) Co-authored-by: Cursor <cursoragent@cursor.com>
… into feat/vault-force-empty-ocr-rounds
Track per-request timestamps and seqNrs from capability.handleRequest through Observation, StateTransition, and Transmit, emitting OTLP latency and round delta metrics plus outcome counters for success, timeout, and response errors. Add platform_vault_plugin_local_queue_size histogram on each Observation for the local request store size. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
… into feat/vault-force-empty-ocr-rounds
… into feat/vault-capability-advanced-metrics
… into feat/vault-capability-advanced-metrics
… into feat/vault-capability-advanced-metrics
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…m/smartcontractkit/chainlink into feat/vault-capability-advanced-metrics
CORA - Pending Reviewers
Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
|
| limiter, err := limits.MakeUpperBoundLimiter(factory, spec) | ||
| if err != nil { | ||
| return 0, fmt.Errorf("%s: %w", settingKey, err) | ||
| } | ||
| defer func() { _ = limiter.Close() }() | ||
|
|
||
| v, err := limiter.Limit(ctx) |
There was a problem hiding this comment.
No need to construct a limiter to just do a lookup:
| limiter, err := limits.MakeUpperBoundLimiter(factory, spec) | |
| if err != nil { | |
| return 0, fmt.Errorf("%s: %w", settingKey, err) | |
| } | |
| defer func() { _ = limiter.Close() }() | |
| v, err := limiter.Limit(ctx) | |
| v, err := spec.GetOrDefault(ctx, factory.Settings) |




Summary
Adds observability for the Vault capability and OCR reporting plugin: per-request lifecycle timestamps and seqNrs from
Capability.handleRequestthrough blob broadcast, pending queue writes, observation batch processing, state transition outcomes, and transmit, through successful capability response or timeout.Also records
platform_vault_plugin_local_queue_sizeon each Observation.Metrics
success|timeout|response_errorImplementation notes
delegate.gointo capability, reporting plugin factory, and transmitter.-1when unset.Tickets:
https://smartcontract-it.atlassian.net/browse/CRE-3517
https://smartcontract-it.atlassian.net/browse/CRE-4072