feat(relay): add EDGEE_TRACE_BODY env to disable body logging#145
Closed
choronz wants to merge 1 commit into
Closed
feat(relay): add EDGEE_TRACE_BODY env to disable body logging#145choronz wants to merge 1 commit into
choronz wants to merge 1 commit into
Conversation
Add an opt-in --trace-body flag and EDGEE_TRACE_BODY env var for relay body tracing. When EDGEE_TRACE_BODY is 0|false|off it forces body logging off, overriding --trace-body. Bodies are gated in both request and response handlers; headers/url still log when --log-output is set.
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
--trace-bodyflag toedgee relayfor tracing raw request/response bodies in the relay log.EDGEE_TRACE_BODYenvironment variable: when set to0,false, oroff(case-insensitive) it forces body logging off, overriding--trace-body.handle_requestandhandle_response; URL + headers still log whenever--log-outputis set.Behavior
EDGEE_TRACE_BODYedgee relay --log-output x.logedgee relay --log-output x.log --trace-bodyedgee relay --log-output x.log --trace-body0/false/offMotivation
Body tracing buffers the full payload per request, so it should be off by default and easy to disable without re-invoking the CLI. The
EDGEE_TRACE_BODY=0env var lets a wrapper force it off.Test plan
cargo test -p edgee-cli --bin edgee relay— 25 tests pass.statusline::wraptest failures exist onmainand are unrelated to this change.🤖 Generated with opencode