Skip to content

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

Merged
ericapisani merged 3 commits into
py-2588-openai-agents-invoke-agentfrom
py-2588-openai-agents-utils
Aug 10, 2026
Merged

feat(openai-agents): Support data_collection config for input/output gating#7125
ericapisani merged 3 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

@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 📊

101564 passed | ⏭️ 6677 skipped | Total: 108241 | Pass Rate: 93.83% | Execution Time: 356m 21s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +1980
Passed Tests 📈 +1974
Failed Tests
Skipped Tests 📈 +6

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2500 uncovered lines.
✅ Project coverage is 90.04%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.02%    90.04%    +0.02%
==========================================
  Files          193       193         —
  Lines        25074     25112       +38
  Branches      9066      9100       +34
==========================================
+ Hits         22574     22612       +38
- Misses        2500      2500         —
- Partials      1438      1439        +1

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
…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
@ericapisani
ericapisani force-pushed the py-2588-openai-agents-utils branch from 3462f77 to 42815ba Compare August 10, 2026 13:21
@ericapisani
ericapisani merged commit 689491a into master Aug 10, 2026
145 checks passed
@ericapisani
ericapisani deleted the py-2588-openai-agents-utils branch August 10, 2026 13:47
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