Conversation
arnaugiralt
previously approved these changes
May 7, 2026
Member
arnaugiralt
left a comment
There was a problem hiding this comment.
LGTM, two minor comments, good work
qarlosh
added a commit
that referenced
this pull request
May 8, 2026
…valid-modes list Per Arnau's review on #92: - config.ObservabilityConfig.LogTargetAddr is now observability.TargetAddrMode instead of string, eliminating casts at every use site (chaperone.go, loader.go, proxy server). - Validation in validate.go now delegates to observability.ParseTargetAddrMode, removing the duplicate ValidLogTargetAddrModes slice from defaults.go. The observability package is the single source of truth for valid modes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…h/full) Adds observability.log_target_addr (env: CHAPERONE_OBSERVABILITY_LOG_TARGET_ADDR) so operators can opt in to logging the upstream target with more detail. Three modes: host (default — authority only, same behavior PR #68 introduced), path (scheme + host + path, no query), full (full URL incl. query, userinfo always stripped). Renames the target_host field to target_addr everywhere (15 log sites) so the same key carries the formatted value across the entire log pipeline. A single observability.FormatTargetAddr helper replaces three duplicated extract*Host helpers and guarantees byte-identical output across every site for a given request. Emits an informational INFO at startup for path and a loud slog.Warn for full, mirroring the existing body-logging warning. Includes a cross-site consistency test that fails if any future log emits a different target_addr value than the rest within a single request. Closes LITE-34062. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…valid-modes list Per Arnau's review on #92: - config.ObservabilityConfig.LogTargetAddr is now observability.TargetAddrMode instead of string, eliminating casts at every use site (chaperone.go, loader.go, proxy server). - Validation in validate.go now delegates to observability.ParseTargetAddrMode, removing the duplicate ValidLogTargetAddrModes slice from defaults.go. The observability package is the single source of truth for valid modes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d43746b to
a8f1532
Compare
arnaugiralt
approved these changes
May 8, 2026
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.
Adds observability.log_target_addr (env: CHAPERONE_OBSERVABILITY_LOG_TARGET_ADDR) so operators can opt in to logging the upstream target with more detail. Three modes: host (default — authority only, same behavior PR #68 introduced), path (scheme + host + path, no query), full (full URL incl. query, userinfo always stripped).
Renames the target_host field to target_addr everywhere (15 log sites) so the same key carries the formatted value across the entire log pipeline. A single observability.FormatTargetAddr helper replaces three duplicated extract*Host helpers and guarantees byte-identical output across every site for a given request.
Emits an informational INFO at startup for path and a loud slog.Warn for full, mirroring the existing body-logging warning. Includes a cross-site consistency test that fails if any future log emits a different target_addr value than the rest within a single request.