Skip to content

Conversation

@thomasjib
Copy link
Contributor

re-named branch from #100 for docker action to work

Copilot AI review requested due to automatic review settings January 23, 2026 14:53
Copy link
Contributor

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 PR enables metric tracking for all protocols by refactoring the metrics implementation to use the ConnectionTracker pattern. Instead of manually wrapping connections with metrics at the protocol level, metrics tracking is now registered as a tracker with the router, which applies it automatically to all routed connections.

Changes:

  • Removed direct metrics wrapping from the algeneva inbound protocol (metrics.NewConn call)
  • Implemented a new MetricsTracker that conforms to the adapter.ConnectionTracker interface
  • Added comprehensive test coverage for the tracker functionality
  • Updated OpenTelemetry dependencies from v1.38.0 to v1.39.0
  • Configured a default noop MeterProvider to disable metrics unless explicitly enabled
  • Integrated metrics tracker conditionally in cmd_run.go based on MeterProvider type

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
protocol/algeneva/inbound.go Removed direct metrics wrapping - metrics now applied via tracker pattern
metrics/tracker.go New ConnectionTracker implementation for metrics, wrapping connections and packet connections
metrics/tracker_test.go Comprehensive unit test validating metrics tracking for TCP connections
cmd/main.go Set default noop MeterProvider and added necessary imports
cmd/cmd_run.go Added conditional metrics tracker initialization based on MeterProvider type
go.mod Updated OpenTelemetry dependencies to v1.39.0 and added new indirect dependencies
go.sum Updated checksums for new dependency versions
.gitignore Added standard .DS_Store exclusion for macOS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@thomasjib thomasjib merged commit be4f7ec into main Jan 23, 2026
2 checks passed
@thomasjib thomasjib deleted the thomas-metrics branch January 23, 2026 18:35
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.

2 participants