Skip to content

feat(relay): add EDGEE_TRACE_BODY env to disable body logging#145

Closed
choronz wants to merge 1 commit into
edgee-ai:mainfrom
choronz:trace-headers
Closed

feat(relay): add EDGEE_TRACE_BODY env to disable body logging#145
choronz wants to merge 1 commit into
edgee-ai:mainfrom
choronz:trace-headers

Conversation

@choronz

@choronz choronz commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in --trace-body flag to edgee relay for tracing raw request/response bodies in the relay log.
  • Add an EDGEE_TRACE_BODY environment variable: when set to 0, false, or off (case-insensitive) it forces body logging off, overriding --trace-body.
  • Bodies are gated in both handle_request and handle_response; URL + headers still log whenever --log-output is set.

Behavior

Command EDGEE_TRACE_BODY Bodies logged?
edgee relay --log-output x.log unset No (default off)
edgee relay --log-output x.log --trace-body unset Yes
edgee relay --log-output x.log --trace-body 0/false/off No (env overrides)

Motivation

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=0 env var lets a wrapper force it off.

Test plan

  • cargo test -p edgee-cli --bin edgee relay — 25 tests pass.
  • Note: pre-existing statusline::wrap test failures exist on main and are unrelated to this change.

🤖 Generated with opencode

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.
@choronz
choronz requested a review from a team as a code owner July 16, 2026 13:21
@choronz choronz closed this by deleting the head repository Jul 16, 2026
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