Skip to content

Conversation

@dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Dec 30, 2025

wireauth will be used for both TCP and UDP and we need separate
metrics , and since we don't support labels we just generate different instances of metrics

@dshulyak dshulyak force-pushed the dmitry/tcp-wireauth-generic-metrics branch from 06bc8f0 to 9c369b9 Compare December 30, 2025 13:21
@dshulyak dshulyak force-pushed the dmitry/tcp-wireauth-generic-metrics branch 2 times, most recently from 16b4b92 to ca1f371 Compare January 12, 2026 08:30
wireauth will be used for both TCP and UDP and we need separate
metrics for each since we don't support labels.
@dshulyak dshulyak force-pushed the dmitry/tcp-wireauth-generic-metrics branch from ca1f371 to 3c53e8f Compare January 12, 2026 09:00
@dshulyak dshulyak changed the title monad-wireauth: make metrics a generic type parameter monad-wireauth: parametrize metrics Jan 14, 2026
@dshulyak dshulyak marked this pull request as ready for review January 14, 2026 09:06
Copilot AI review requested due to automatic review settings January 14, 2026 09:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants