Better config-time validation for overlapping flow metrics configuration#2983
Merged
jmacd merged 6 commits intoMay 18, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2983 +/- ##
========================================
Coverage 85.93% 85.93%
========================================
Files 725 725
Lines 275782 275980 +198
========================================
+ Hits 236996 237172 +176
- Misses 38262 38284 +22
Partials 524 524
🚀 New features to boost your workflow:
|
Contributor
Author
|
@drewrelmas should get a look at this since it bubbles up to his flow metrics work. Feedback & comments are very welcome. |
lalitb
reviewed
May 16, 2026
1 task
Contributor
Author
|
Created #3009 to capture the follow-up hardening for unreachable end nodes. |
Contributor
Author
|
Ready for merge, IMO. |
jmacd
approved these changes
May 18, 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.
Closes #2784.
This change implements a BFS walk of the processor pipeline at construction time to validate that flow metrics do not collide.
runtime_pipeline.rs, introduce a helper func to capture a flat edge list vector of pipeline connections and pass the result as a new param onbuild_flow_metric_state. Saves us from having to pass in some part of_configinto that function and keeps data types better separated.flow_metrics.rs:build_flow_metric_state, add a new data structure that captures start\end pairs for registered flow metrics.Tests
Within
flow_metrics.rs, this change adds 10 unit tests, as follows:Validation
The following commands pass cleanly:
cargo check -p otap-df-enginecargo test -p otap-df-engine(contains new tests)cargo clippy -p otap-df-engine --all-targets -- -D warningscargo fmt --all -- --checkcargo xtask quick-check