Add protocol-aware service bindings to server logs - #2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements issue #1415 by making operational server logs protocol-aware via ServiceBinding, while preserving the existing server_socket_addr field for compatibility. This aligns runtime logging with the already protocol-aware service identity used elsewhere (e.g., health check details and metric labels).
Changes:
- Add
service_binding(post-bindServiceBinding) to HTTP tracker + REST API request/response tracing logs, retainingserver_socket_addr. - Add
service_bindingto UDP error logs, retainingserver_socket_addr. - Update REST API router wiring to accept
&ServiceBindingand deriveserver_socket_addrfrom it; add manual verification evidence to the issue spec.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/udp-server/src/handlers/error.rs | Include service_binding in UDP error logs while keeping server_socket_addr. |
| packages/axum-rest-api-server/src/server.rs | Build ServiceBinding post-bind and pass it into the router. |
| packages/axum-rest-api-server/src/routes.rs | Add service_binding + derived server_socket_addr to request/response/failure logs. |
| packages/axum-http-server/src/v1/routes.rs | Add service_binding + derived server_socket_addr to request/response/failure logs (refactored via helper). |
| docs/issues/open/2023-1978-expose-configured-public-urls-in-runtime-observability.md | New follow-up issue spec clarifying separation of bind address vs service binding vs public URL. |
| docs/issues/open/1978-configuration-overhaul-epic.md | Update EPIC tracking to reflect #1415 completion and add #2023 follow-up. |
| docs/issues/open/1415-1978-use-service-binding-instead-of-socket-addr/manual-verification.md | Add recorded manual verification evidence for the new log fields and unchanged health/metrics behavior. |
| docs/issues/open/1415-1978-use-service-binding-instead-of-socket-addr/ISSUE.md | Add finalized issue spec (folder form) documenting goals, constraints, and verification. |
| docs/issues/open/1415-1978-use-service-binding-instead-of-socket-addr.md | Remove the old single-file spec in favor of the folder-based spec + evidence files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
ACK 58504af |
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.
Summary
Add protocol-aware
service_bindingfields to server operational logs while retaining the existingserver_socket_addrfield for compatibility.ServiceBinding.ServiceBinding.ServiceBindingand derives the compatible socket-address field from it.Verification
cargo fmt --checklinter allcargo test -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-servercargo test --workspaceTORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.shCloses #1415