Skip to content

feat(openai): Gate response output collection on data collection options - #7035

Draft
ericapisani wants to merge 2 commits into
masterfrom
py-2588-openai-set-common-output-data
Draft

feat(openai): Gate response output collection on data collection options#7035
ericapisani wants to merge 2 commits into
masterfrom
py-2588-openai-set-common-output-data

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Gate OpenAI response text and tool calls collection on the new data_collection settings, giving precedence over the legacy send_default_pii flag for backwards compatibility.

Applies to Chat Completions API, Responses API, and their streaming variants.

Refs PY-2588

Gate OpenAI response text and tool calls collection on the new
data_collection settings, giving precedence over the legacy send_default_pii
flag for backwards compatibility.

Applies to Chat Completions API, Responses API, and their streaming variants.

Refs PY-2588
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

PY-2588

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99165 passed | ❌ 1 failed | ⏭️ 6527 skipped | Total: 105693 | Pass Rate: 93.82% | Execution Time: 361m 37s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +2480
Passed Tests 📈 +2191
Failed Tests 📈 +1
Skipped Tests 📈 +288

➕ New Tests (1)

View new tests
  • test_continuous_profiler_auto_start_and_stop_sampled[experiment-gevent]
    • File: tests.profiler.test_continuous_profiler
    • Status: ❌ Failing

❌ Failed Tests

test_continuous_profiler_auto_start_and_stop_sampled[experiment-gevent]

File: tests.profiler.test_continuous_profiler
Suite: py3.6-gevent
Error: AssertionError: profiler should not be running assert 'c426171f492247b1a769527cd7a0c6ac' is None + where 'c426171f492247b1a769527cd7a0c6ac' = get_profiler_id()

Stack Trace
tests/profiler/test_continuous_profiler.py:812: in test_continuous_profiler_auto_start_and_stop_sampled
    assert get_profiler_id() is None, "profiler should not be running"
E   AssertionError: profiler should not be running
E   assert 'c426171f492247b1a769527cd7a0c6ac' is None
E    +  where 'c426171f492247b1a769527cd7a0c6ac' = get_profiler_id()

✅ Patch coverage is 95.45%. Project has 2504 uncovered lines.
✅ Project coverage is 89.93%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/openai.py 95.45% ⚠️ 2 Missing and 2 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.91%    89.93%    +0.02%
==========================================
  Files          193       193         —
  Lines        24828     24865       +37
  Branches      8930      8968       +38
==========================================
+ Hits         22322     22361       +39
- Misses        2506      2504        -2
- Partials      1416      1413        -3

Generated by Codecov Action

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