feat(tcp): add praxis_tcp_connections_total counter metric - #1037
Conversation
praxis-bot
left a comment
There was a problem hiding this comment.
PR Review: feat(tcp): add praxis_tcp_connections_total counter metric
Clean, well-scoped addition of a Prometheus counter for TCP connection throughput. The implementation correctly follows established metrics patterns (is_recorder_installed() guard, SharedString labels, placement after overload checks). The listener_label extraction avoids a redundant listener_label_for call.
Test coverage is solid: unit test for the no-recorder path, integration test verifying counter value after 3 connections (>= 3), and two example config tests exercising counter emission and traffic forwarding end-to-end.
| Severity | Count |
|---|---|
| Critical | 0 |
| Large | 0 |
| Medium | 1 |
1 inline comment posted.
3a45dad to
2048fbe
Compare
|
Docs covered in #1036 |
Pull request was converted to draft
|
Hmm.. I think this was just moved to Draft due to the policy change. @tsisodia10 Could you resolve the conflicts? |
praxis-bot
left a comment
There was a problem hiding this comment.
PR Review
Re-review: new commits since last review (2026-08-25).
Summary: The new commits introduced a merge from main that appears to have corrupted protocol/src/tcp/metrics.rs. The function record_tcp_connection_accepted is missing its closing brace, and duplicate SPDX headers and import lines were introduced. CI has only run metadata checks (DCO, commit messages), not build/lint/test, so these compilation errors are uncaught.
Overall: The PR cannot compile in its current state. Needs fixes before further review.
| Severity | Count |
|---|---|
| Critical | 1 |
| Large | 0 |
| Medium | 2 |
3985bca to
2048fbe
Compare
Increment a Prometheus counter on every accepted TCP connection, labeled by listener name. Gives operators visibility into connection throughput per listener over time. Closes praxis-proxy#1025 Signed-off-by: Twinkll Sisodia <tsisodia@redhat.com>
2048fbe to
3bfe23d
Compare
Increment a Prometheus counter on every accepted TCP connection, labeled by listener name. Gives operators visibility into connection throughput per listener over time.
What does this PR do?
Adds a
praxis_tcp_connections_totalPrometheus counter that increments once per accepted TCP connection, labeled by listener name. This enables operators to compute connection rates (connections/sec) per listener in dashboards.Changes:
protocol/src/tcp/metrics.rsmodule withrecord_tcp_connection_accepted()process_new()after overload checks passexamples/configs/observability/tcp-connections-total.yamlWhich issue(s) does this relate to?
Fixes #1025
Checklist
git commit -s)make lint && make testpasses locallyDoes this introduce a breaking change?
No. The counter is purely additive and only emitted when the admin interface is enabled.