Merged
Conversation
06bc8f0 to
9c369b9
Compare
ca1f371 to
3c53e8f
Compare
There was a problem hiding this comment.
Pull request overview
This pull request parametrizes metrics in the wireauth module to support separate metric instances for TCP and UDP transports. Since the codebase doesn't support metric labels, different instances of metrics are generated with transport-specific prefixes.
Changes:
- Refactored metrics from global constants to a struct-based approach with parameterized metric names
- Introduced a macro to generate transport-specific metric instances (UDP and TCP)
- Updated all API constructors and internal components to accept metric names as a parameter
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| monad-wireauth/src/metrics.rs | Replaced global constants with MetricNames struct and added define_metric_names! macro to generate transport-specific metrics |
| monad-wireauth/src/lib.rs | Made metrics module public and exported MetricNames, DEFAULT_METRICS, TCP_METRICS, UDP_METRICS |
| monad-wireauth/src/api.rs | Updated API::new() to accept metric_names parameter and use it throughout metric recording |
| monad-wireauth/src/state.rs | Updated State::new() to accept and store metric_names parameter |
| monad-wireauth/src/filter.rs | Updated Filter::new() to accept and store metric_names parameter |
| monad-wireauth/tests/*.rs | Updated all test instantiations to pass DEFAULT_METRICS |
| monad-wireauth/examples/demo.rs | Updated example to use DEFAULT_METRICS |
| monad-wireauth/benches/manager_bench.rs | Updated benchmark to use DEFAULT_METRICS |
| monad-raptorcast/src/auth/protocol.rs | Updated WireAuthProtocol::new() to accept metric_names parameter |
| monad-raptorcast/src/auth/metrics.rs | Added UDP_METRICS instance using the macro |
| monad-raptorcast/src/auth/socket.rs | Updated test code to use UDP_METRICS |
| monad-raptorcast/src/lib.rs | Updated to pass UDP_METRICS to auth protocol |
| monad-raptorcast/tests/wireauth_raptorcast.rs | Updated to pass UDP_METRICS |
| monad-raptorcast/examples/latency.rs | Updated to pass UDP_METRICS |
| monad-node/src/main.rs | Updated to pass UDP_METRICS |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ariqchowdhury
previously approved these changes
Jan 15, 2026
3c53e8f to
18156cd
Compare
omegablitz
previously approved these changes
Feb 18, 2026
michael-yxchen
previously approved these changes
Feb 18, 2026
31b35be
31b35be to
f28430e
Compare
wireauth will be used for both TCP and UDP and we need separate metrics for each since we don't support labels.
f28430e to
cb4ec70
Compare
Contributor
Author
|
@omegablitz @michael-yxchen rebased, please reaprove |
michael-yxchen
approved these changes
Feb 19, 2026
omegablitz
approved these changes
Feb 19, 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.
wireauth will be used for both TCP, UDP (raptorcast and separate point to point) and we need separate
metrics , and since we don't support labels we just generate different instances of metrics