Record module failures - #340
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Prometheus counter to track per-module failures in the executor to improve observability of module error rates.
Changes:
- Introduces a
module_failures: IntCounterVecinModuleExecutionMetricsand registers it with the metrics handle. - Adds
record_module_failure()helper to increment the counter for a given module label. - Increments the failure counter in
process_message_with_modulewhen a module returns a non-zero status.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| runtime/plaid/src/executor/mod.rs | Records a module failure metric when the module entrypoint returns a non-zero value. |
| runtime/plaid/src/executor/metrics.rs | Adds and registers the new module_failures counter and exposes record_module_failure(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
obelisk
requested changes
Jul 20, 2026
| .expect("expected unique collector"); | ||
| handle | ||
| .register(Box::new(module_failures.clone())) | ||
| .expect("expected unique collector"); |
Owner
There was a problem hiding this comment.
This probably should have been caught in a previous review but expect could cause a panic. Are we not worried about that?
obelisk
approved these changes
Jul 24, 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.
This pull request adds new metrics to track module failures in the executor, improving observability for error monitoring. The main change is the introduction of a new
IntCounterVecmetric to count failures per module, along with the necessary code to increment this metric when a module fails during execution.Metrics enhancements:
IntCounterVecnamedmodule_failuresto theModuleExecutionMetricsstruct to count the number of failures per module.module_failuresmetric with the metrics handle during initialization.record_module_failureinModuleExecutionMetricsto increment the failure counter for a specific module.process_message_with_moduleto record a module failure using the new metric whenever a module returns a non-zero value (indicating an error).