Repository navigation
feat(bedrock): Set gen_ai.output.messages for non-streaming responses - #8249
Conversation
Coverage Results 📊✅ 139166 passed | ⏭️ 7813 skipped | Total: 146979 | Pass Rate: 94.68% | Execution Time: 450m 26s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00% (5 of 5 changed executable lines covered; target 80%). Changed files with executable lines (1)
Coverage diffGenerated by Coverage Action |
f4e2019 to
fc6b034
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc6b034. Configure here.
| set_on_span( | ||
| SPANDATA.GEN_AI_OUTPUT_MESSAGES, | ||
| json.dumps(_transform_messages([response["output"]["message"]])), | ||
| ) |
There was a problem hiding this comment.
Output messages use legacy PII gate
Medium Severity
The new gen_ai.output.messages recording still gates on has_data_collection_enabled and should_send_default_pii instead of reading data_collection["gen_ai"]["outputs"] directly. data_collection is already fully resolved at init, including the send_default_pii mapping, so those helpers are not needed. The new test also parametrizes a send_default_pii=True path and never covers mixed inputs/outputs (especially outputs: False).
Additional Locations (1)
Triggered by learned rule: Read data_collection directly; no send_default_pii
Reviewed by Cursor Bugbot for commit fc6b034. Configure here.
There was a problem hiding this comment.
I think it's better to be explicit to be honest 🤷


Re-use
_transform_messagesfrom the input transformation saga.