fix: default gen_ai payload capture to off - #20
Merged
Conversation
Flip gen_ai.payload_capture_enabled default from true to false so prompt/ response content is only captured on explicit opt-in. Unset or empty HARNESS_GEN_AI_PAYLOAD_CAPTURE_ENABLED now resolves to capture-off, matching the privacy-control intent (disable wins unless explicitly enabled). Update default-config test and docs to reflect the new default. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
HARNESS_ENABLE_API and HARNESS_ENABLE_AI_* now resolve under both HARNESS_ and HA_ prefixes (HARNESS_ wins when both are set), matching the HA_/HARNESS_ parity of the other SDK settings. AT_/TA_ aliases remain unsupported — the flags never existed under those prefixes. Co-authored-by: Cursor <cursoragent@cursor.com>
The console span exporter was gated on env var presence, so HARNESS_ENABLE_CONSOLE_SPAN_EXPORTER=false (or any value) still enabled it. Switch to strict boolean resolution via the new is_env_flag_enabled helper: only the case-insensitive value 'true' enables the exporter, resolved with the usual HARNESS_ > HA_ > AT_ > TA_ precedence. Remove the now-unused is_env_var_present presence-check helper. Co-authored-by: Cursor <cursoragent@cursor.com>
t-santoshsahu
approved these changes
Jul 28, 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.
Summary
gen_ai.payload_capture_enableddefault fromtruetofalseindefault.py— prompt/response content is now captured only on explicit opt-in (HARNESS_/HA_/AT_/TA_GEN_AI_PAYLOAD_CAPTURE_ENABLED=trueor YAML config). Unset or empty env var resolves to capture-off, matching the privacy-control intent ingenai_env.py.HA_alias for instrumentation opt-in flags:HARNESS_ENABLE_API/HARNESS_ENABLE_AI_*now resolve under bothHARNESS_andHA_(HARNESS_wins when both set).AT_/TA_remain unsupported for these flags.falseforENABLE_CONSOLE_SPAN_EXPORTER: was a presence check (any value, includingfalse, enabled the exporter); now strict boolean — onlytrueenables it, resolved withHARNESS_>HA_>AT_>TA_precedence via newis_env_flag_enabled. Removes the unusedis_env_var_presenthelper.sdk-quickstart.md,AGENTS.md).Test plan
HA_alias enables opt-in flags,HARNESS_wins overHA_,AT_/TA_ignored; console exporter boolean resolution incl. explicitfalse, empty, legacy aliases, precedenceHA_GEN_AI_PAYLOAD_CAPTURE_ENABLED→ prompts not captured;true→ captured;HARNESS_ENABLE_CONSOLE_SPAN_EXPORTER=false→ no console spans;HA_ENABLE_AI_OPENAI=true→ OpenAI instrumented