Sitelet https://github.com/getsentry/sentry-python/pull/7253
Skip to content

fix(starlette): Gate request body collection on data_collection experiment - #7253

Open
ericapisani wants to merge 1 commit into
py-2419-request-body-fastapifrom
py-2419-request-body-starlette
Open

fix(starlette): Gate request body collection on data_collection experiment#7253
ericapisani wants to merge 1 commit into
py-2419-request-body-fastapifrom
py-2419-request-body-starlette

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Only attach request body data to events and spans when "incoming_request" is present in the data_collection.http_bodies experiment option (or when the experiment is unset, preserving default behavior).

Refs PY-2419
Refs #6283

…iment

Only attach request body data to events and spans when
"incoming_request" is present in the data_collection.http_bodies
experiment option (or when the experiment is unset, preserving
default behavior).

Refs PY-2419
Refs #6283
@ericapisani
ericapisani requested a review from a team as a code owner August 25, 2026 20:14
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

PY-2419

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

115253 passed | ❌ 2 failed | ⏭️ 6732 skipped | Total: 121987 | Pass Rate: 94.48% | Execution Time: 412m 46s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +16586
Passed Tests 📈 +16331
Failed Tests 📈 +2
Skipped Tests 📈 +253

➕ New Tests (1)

View new tests
  • test_binary_content_encoding_image_url[True-False]
    • File: tests.integrations.litellm.test_litellm
    • Status: ❌ Failing

❌ Failed Tests

test_binary_content_encoding_image_url[True-False]

File: tests.integrations.litellm.test_litellm
Suite: py3.10-litellm-v1.83.14
Error: assert 0 == 1 + where 0 = len([])

Stack Trace
tests/integrations/litellm/test_litellm.py:2849: in test_binary_content_encoding_image_url
    assert len(chat_spans) == 1
E   assert 0 == 1
E    +  where 0 = len([])

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.22%    90.24%    +0.02%
==========================================
  Files          193       193         —
  Lines        25435     25459       +24
  Branches      9346      9366       +20
==========================================
+ Hits         22947     22973       +26
- Misses        2488      2486        -2
- Partials      1434      1433        -1

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