Skip to content

Test merge - #7336

Merged
sentrivana merged 20 commits into
major/3.0from
ivana/major/test-merge
Sep 2, 2026
Merged

Test merge#7336
sentrivana merged 20 commits into
major/3.0from
ivana/major/test-merge

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

Another big-ish merge from master, test here with live CI first.

ericapisani and others added 19 commits August 31, 2026 08:35
REMOTE_ADDR was previously set unconditionally in the request env for
aiohttp, sanic, and tornado. Now it respects the
data_collection.user_info experiment when data collection is enabled,
falling back to the legacy unconditional behaviour otherwise.

Fixes PY-2751
Fixes #7297
…raphQL (#7296)

Ariadne and Strawberry now gate response body capture on the
`outgoing_response` http_bodies option, falling back to send_default_pii
when data_collection isn't configured.

Fixes PY-2750
Fixes #7294
…tion (#7300)

Filter the request event's query_string through the url_query_params
data_collection behaviour, mirroring the existing gating for the client
span's url.query attribute.

Fixes PY-2752
Fixes #7299
The `aiohttp` integration currently has a dead branch that looks live:


https://github.com/getsentry/sentry-python/blob/8e6d73b6ca64b810393516a84aecd3817045c452/sentry_sdk/integrations/aiohttp.py#L341-L356

`isinstance(current_span, StreamedSpan)` is **always false**, so the
first branch never matches. `sentry_sdk.get_current_span()` does not
return `StreamedSpan`s. (It reads from `scope.span`, but the streamed
span is in `scope.streamed_span`).

This doesn't functionally matter, because even though we always fall
through to the `else` branch, `set_transaction_name` already handles the
streamed span case (including the name and source). This is tested in
[`test_transaction_style_span_streaming`](https://github.com/getsentry/sentry-python/blob/45e02e7e28c6aa7da56510124c8a4ee4999682a8/tests/integrations/aiohttp/test_aiohttp.py#L1845)
already.

Remove the misleading branch.
…7286)

Apply the data_collection.url_query_params behaviour to httpx span
attributes (url.full, url.query, url.fragment) and breadcrumbs when
span streaming is enabled, filtering sensitive query params instead
of relying solely on send_default_pii.

Fixes PY-2742
Fixes #7277
…7287)

Mirror the httpx integration: apply the data_collection.url_query_params
behaviour to httpx2 span attributes (url.full, url.query, url.fragment)
and
breadcrumbs when span streaming is enabled, filtering sensitive query
params
instead of relying solely on send_default_pii.

Fixes PY-2743
Fixes #7278
…ms (#7288)

Previously the pyreqwest integration only redacted URL query params
and fragments based on send_default_pii, always leaking the full
query string when PII collection was enabled. Now the
data_collection experiment's url_query_params allow/deny list is
applied to spans and breadcrumbs, matching the behaviour already
shipped for httpx.

Legacy (non span-streaming) breadcrumbs still report the bare URL
without the query string, but the query value itself is filtered
consistently with span streaming.

Fixes PY-2746
Fixes #7281
#7289)

Respect the data_collection.gen_ai.inputs/outputs config option when
capturing chat/embed request and response data, falling back to the
legacy send_default_pii + include_prompts behavior when not set.

Fixes PY-2747
Fixes #7282
…7290)

Previously the boto3 integration only redacted URL query params and
fragments based on send_default_pii, always leaking the full query
string
when PII collection was enabled. Now the data_collection experiment's
url_query_params allow/deny list is applied to the span-streaming span
attributes and to breadcrumbs, matching the behaviour already shipped
for
httpx and pyreqwest.

url.full now includes the filtered query string and fragment, and
url.query / url.fragment are omitted rather than reported as empty
strings when the request URL has none.

The legacy (non span-streaming) span path is left as-is.

Fixes PY-2745
Fixes #7280
…7291)

Previously the stdlib httplib integration only gated url.full, url.query
and
url.fragment on send_default_pii, so with data_collection configured the
URL
data was dropped entirely and no allow/denylist filtering was ever
applied.
The data_collection experiment's url_query_params behaviour is now
applied to
span streaming spans and breadcrumbs, matching httpx and pyreqwest.

url.full is now reassembled with the filtered query and fragment, and
empty
url.query/url.fragment attributes are no longer emitted. The legacy
(non span-streaming) path is left unchanged.

Fixes PY-2744
Fixes #7279
…#7295)

Route input/output attribute collection for AI_AGENT, AI_CHAT, and
AI_TOOL span templates through the `data_collection.gen_ai` option when
enabled, falling back to `send_default_pii` otherwise. Prompts recorded
via `prompt`/`system_prompt` kwargs stay ungated when `data_collection`
is not configured, preserving pre-existing behavior.

Fixes PY-2749
Fixes #7293
Add `google-genai` to the typing dependency group and fix the resulting mypy errors.
Add `anthropic` to the typing dependency group and fix the resulting mypy errors.
Sphinx docs had no usage analytics, so there was no visibility into
which API reference pages get traffic. Overrides the shibuya theme's
empty extra-head partial to load the Plausible script.

Fixes PY-2757
Fixes #7318
….23 (#7320)

quart-flask-patch is incompatible with quart>=0.23 due to RequestContext
changes, so pin its dependency to <0.23 and skip the patch test above
that version.

Also update test_error_in_errorhandler: since 0.23 (db05772), Quart runs
request handling inside an asyncio.TaskGroup, so exceptions propagate
wrapped in an ExceptionGroup instead of bare.

Fixes PY-2754
Fixes #7305
)

Build the agent with public `instructions`/`system_prompt` kwargs
instead of poking internal `_instructions`/`_system_prompts` attributes,
and account for the joiner between multiple instructions changing from a
single newline to a blank line in pydantic-ai 2.36.0.

[There's normalization of instructions occurring under the hood as of
2.36.0](https://github.com/pydantic/pydantic-ai/blame/6246795faf941937e1759f51b0dfc65d82a4667b/pydantic_ai_slim/pydantic_ai/agent/__init__.py#L673-L676)
that we don't have a reason to interfere with within the tests, so
moving the configuration of instructions and the system prompt to using
the public `Agent` API.

Fixes PY-2755
Fixes #7306
Update our test matrix with new releases of integrated frameworks and
libraries.

## How it works
- Scan PyPI for all supported releases of all frameworks we have a
dedicated test suite for.
- Pick a representative sample of releases to run our test suite
against. We always test the latest and oldest supported version.
- Update
[tox.ini](https://github.com/getsentry/sentry-python/blob/master/tox.ini)
with the new releases.

## Action required
- If CI passes on this PR, it's safe to approve and merge. It means our
integrations can handle new versions of frameworks that got pulled in.
- If CI doesn't pass on this PR, this points to an incompatibility of
either our integration or our test setup with a new version of a
framework.
- Check what the failures look like and either fix them, or update the
[test
config](https://github.com/getsentry/sentry-python/blob/master/scripts/populate_tox/config.py)
and rerun
[scripts/generate-test-files.sh](https://github.com/getsentry/sentry-python/blob/master/scripts/generate-test-files.sh).
See
[scripts/populate_tox/README.md](https://github.com/getsentry/sentry-python/blob/master/scripts/populate_tox/README.md)
for what configuration options are available.

 _____________________

_🤖 This PR was automatically created using [a GitHub
action](https://github.com/getsentry/sentry-python/blob/master/.github/workflows/update-tox.yml)._

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alexander Alderman Webb <alexander.webb@sentry.io>
Co-authored-by: Erica Pisani <hey@ericapisani.dev>
Recognize snowflake, clickhouse, mongodb, and cockroachdb as db.system
values when inferring the database system from the SQLAlchemy dialect
name.

Refs PY-2531
Refs #6573
@sentrivana sentrivana changed the title Ivana/major/test merge Test merge Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

113285 passed | ⏭️ 5339 skipped | Total: 118624 | Pass Rate: 95.5% | Execution Time: 371m 7s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -13046
Passed Tests 📉 -11621
Failed Tests 📉 -1
Skipped Tests 📉 -1424

➖ Removed Tests (1)

View removed tests
  • test_cache_spans_item_size[True]
    • File: tests.integrations.django.test_cache_module

All tests are passing successfully.

✅ Patch coverage is 88.75%. Project has 2256 uncovered lines.
✅ Project coverage is 90.45%. Comparing base (base) to head (head).

Files with missing lines (6)
File Patch % Lines
sentry_sdk/integrations/google_genai/utils.py 67.31% ⚠️ 17 Missing and 11 partials
sentry_sdk/integrations/sqlalchemy.py 0.00% ⚠️ 8 Missing
sentry_sdk/integrations/anthropic.py 94.74% ⚠️ 2 Missing and 2 partials
sentry_sdk/integrations/httpx.py 100.00% ⚠️ 1 partials
sentry_sdk/integrations/httpx2.py 100.00% ⚠️ 1 partials
sentry_sdk/tracing_utils.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.24%    90.45%    +0.21%
==========================================
  Files          193       185        -8
  Lines        25658     23634     -2024
  Branches      9462      8678      -784
==========================================
+ Hits         23154     21378     -1776
- Misses        2504      2256      -248
- Partials      1443      1375       -68

Generated by Codecov Action

@sentrivana
sentrivana force-pushed the ivana/major/test-merge branch from 0d284e9 to beca9b5 Compare September 2, 2026 11:22
@sentrivana
sentrivana merged commit beca9b5 into major/3.0 Sep 2, 2026
126 checks passed
@sentrivana
sentrivana deleted the ivana/major/test-merge branch September 2, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants