Skip to content

feat(openai-agents): Support data_collection config for input/output gating - #7125

Open
ericapisani wants to merge 4 commits into
py-2588-openai-agents-invoke-agentfrom
py-2588-openai-agents-utils
Open

feat(openai-agents): Support data_collection config for input/output gating#7125
ericapisani wants to merge 4 commits into
py-2588-openai-agents-invoke-agentfrom
py-2588-openai-agents-utils

Conversation

@ericapisani

@ericapisani ericapisani commented Aug 6, 2026

Copy link
Copy Markdown
Member

Add support for the data_collection experimental feature to control whether
request inputs and response outputs are collected in OpenAI agents spans.

The data_collection setting takes precedence over send_default_pii:

  • data_collection.gen_ai.inputs/outputs explicitly controls collection
  • When data_collection is omitted, falls back to send_default_pii

Refs PY-2588

…gating

Add support for the data_collection experimental feature to control whether
request inputs and response outputs are collected in OpenAI agents spans.

The data_collection setting takes precedence over send_default_pii:
- data_collection.gen_ai.inputs/outputs explicitly controls collection
- When data_collection is omitted, falls back to send_default_pii

Refs PY-2588
@linear-code

linear-code Bot commented Aug 6, 2026

Copy link
Copy Markdown

PY-2588

@ericapisani
ericapisani marked this pull request as ready for review August 7, 2026 14:09
@ericapisani
ericapisani requested a review from a team as a code owner August 7, 2026 14:09
Comment thread sentry_sdk/integrations/openai_agents/utils.py
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

101239 passed | ⏭️ 6485 skipped | Total: 107724 | Pass Rate: 93.98% | Execution Time: 365m 16s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -428
Passed Tests 📉 -278
Failed Tests
Skipped Tests 📉 -150

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2507 uncovered lines.
❌ Project coverage is 89.98%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    90.02%    89.98%    -0.04%
==========================================
  Files          193       193         —
  Lines        25010     25029       +19
  Branches      9032      9046       +14
==========================================
+ Hits         22514     22522        +8
- Misses        2496      2507       +11
- Partials      1434      1436        +2

Generated by Codecov Action

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9ab5654. Configure here.

Comment thread tests/integrations/openai_agents/test_openai_agents.py
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.

1 participant