Skip to content

monad-wireauth: parametrize metrics#2692

Merged
dshulyak merged 1 commit intomasterfrom
dmitry/tcp-wireauth-generic-metrics
Feb 19, 2026
Merged

monad-wireauth: parametrize metrics#2692
dshulyak merged 1 commit intomasterfrom
dmitry/tcp-wireauth-generic-metrics

Conversation

@dshulyak
Copy link
Copy Markdown
Contributor

@dshulyak dshulyak commented Dec 30, 2025

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

@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 3 times, most recently 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
Copy Markdown

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.

ariqchowdhury
ariqchowdhury previously approved these changes Jan 15, 2026
omegablitz
omegablitz previously approved these changes Feb 18, 2026
michael-yxchen
michael-yxchen previously approved these changes Feb 18, 2026
@dshulyak dshulyak dismissed stale reviews from michael-yxchen and omegablitz via 31b35be February 18, 2026 19:18
@dshulyak dshulyak force-pushed the dmitry/tcp-wireauth-generic-metrics branch 2 times, most recently from 31b35be to f28430e Compare February 19, 2026 09:20
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 f28430e to cb4ec70 Compare February 19, 2026 10:00
@dshulyak
Copy link
Copy Markdown
Contributor Author

@omegablitz @michael-yxchen rebased, please reaprove

@dshulyak dshulyak enabled auto-merge February 19, 2026 16:14
@dshulyak dshulyak added this pull request to the merge queue Feb 19, 2026
Merged via the queue into master with commit e3e6adf Feb 19, 2026
9 checks passed
@dshulyak dshulyak deleted the dmitry/tcp-wireauth-generic-metrics branch February 19, 2026 19:27
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.

6 participants