[do not merge] Update major branch - #7244
Conversation
…ion (#7180) Modify the LiteLLM integration to respect the data_collection config for controlling whether chat messages, embeddings inputs, and response text are captured in spans. When data collection is enabled, the new gen_ai.inputs and gen_ai.outputs flags control what data is collected. When data collection is not configured, falls back to legacy send_default_pii and include_prompts settings for compatibility. Refs PY-2588 Refs #6748
…7157) ### Description These tests are event-only: they capture events, never spans, and the `span_streaming` argument was only ever fed to `trace_lifecycle`. Both arms exercised identical code paths and asserted identical payloads, so the parametrize doubled the case count without adding coverage. Tests that inspect spans or transactions keep their parametrize. 391 -> 356 cases. Refs PY-2641 Refs #6975
…ption (#7175) Modify the LangGraph integration to respect the data_collection config for controlling whether prompts, responses, tool calls, and available tools are captured in spans. When data collection is enabled, the gen_ai.inputs flag controls request messages, tool calls, and available tools, while gen_ai.outputs controls the response text. Tool calls are gated on inputs because they are fed back to the model as input. Available tools are only gated once data collection is configured, since they were never gated on the legacy PII settings. When data collection is not configured, falls back to legacy send_default_pii and include_prompts settings for compatibility. Refs #6748 <br>Refs #6748
…ntrols (#7181) Replace the single \_should_send_prompts check with \_should_send_inputs and \_should_send_outputs, gated by the new data_collection.gen_ai.inputs/outputs experimental options when set, falling back to the existing send_default_pii * include_prompts behavior otherwise. Available tools are now gated on inputs specifically. This lets callers control request and response data collection independently. Refs PY-2588 Refs #6748
Quart 0.22.0 [reverts](pallets/quart@7337e5f) a change that landed in 0.21.0. Adapt our test accordingly.
…lection is enabled (#7204) When `data_collection` is configured, tool definitions should be set on `GEN_AI_TOOL_DEFINITIONS` instead of the legacy `GEN_AI_REQUEST_AVAILABLE_TOOLS` attribute, matching the updated gen-ai semantic conventions. The legacy attribute is still used when `data_collection` is not configured. Also gate the response tool calls recorded in `on_llm_end` on the `outputs` setting rather than `inputs`, since they are part of the model's response. Refs PY-2734 Refs #7200
…uts (#7207) Tool call data is part of the model's response, so it should be recorded when `data_collection.gen_ai.outputs` is enabled, not gated on `inputs`. We're setting the value to a legacy attribute, but transitioning to the non-legacy attributes should be done separately so we can update all the integrations at around the same time. Refs PY-2734 Refs #7200
) Refs PY-2419 Refs #6283
…rue` (#7237) Easing the transition to an `enable_logs`-free world. Folks who currently have `enable_logs=True` can use our logging API, and they'll have auto-collection of logs from the stdlib logging and Loguru integrations on by default. In the last release, since we made `enable_logs` no-op, they'd lose their auto-collected logs until they'd explicitly opted in via the new integration options. Make the transition easier for users who have `enable_logs=True` now: consider the option in both the Logging and Loguru integrations and make them auto-collect unless explicitly opted-out via one of the integration-level options.
`select_transactions_with_mcp_spans` assumes that all events provided to the helper are transactions and contain a `type` key. However, not all events contain 'type's and so passing events that may contain a log would raise a KeyError. Relates to #7224
…#7235) Add an explicit dependency when a test suite relies on the `get_model_response` fixture that uses `httpx` types. Packages including `anthropic` started upgrading to `httpx2`.
The `openai-agents` package used to construct a default value that was missing the `cache_write_tokens` field, which was later made required in `openai`.
`MCPIntegration` reports `mcp.transport: "stdio"` and `network.transport: "pipe"` for a StreamableHTTP server running stateless. `_get_request_context_data` only sets `"http"` when the request carries an `mcp-session-id` header, and a stateless server issues no session id, so no client sends that header back and the `"stdio"` default stands. The header is a session signal, not a transport signal: per the spec a server *"MAY assign a session ID at initialization time"*, so its presence is a deployment choice. This drops it from the transport check and leaves it supplying `mcp.session.id` when the server is stateful. stdio is unaffected: it attaches no request object, so the outer guard stops it before this branch. | server | before | after | | --- | --- | --- | | stdio | `stdio` | unchanged | | SSE | `sse` + session id from `?session_id=` | unchanged | | StreamableHTTP, stateful | `http` + session id from header | unchanged | | StreamableHTTP, stateless | `stdio` | `http`, no session id | `test_tool_handler_stateless_streamable_http` drives a real stateless `StreamableHTTPSessionManager` app and fails on `master` with `assert 'stdio' == 'http'`. Green on mcp 1.x and 2.x. #### Issues * resolves: #7225
) Check that the output can be iterated to prevent unhandled `TypeError`. This occurs in practice with other gateways because `openai` does not always use strict deserialization. Closes #7222
The renovate regex manager is configured to use GitHub tags. The `getsentry/codecov-action` action was previously not updated in `test_orchestrator.jinja`.
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [anthropics/claude-code-action](https://redirect.github.com/anthropics/claude-code-action) | action | patch | `v1.0.191` → `v1.0.201` | | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | | patch | `v10.0.0` → `v10.0.1` | | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | action | patch | `v10.0.0` → `v10.0.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/6715) for more information. --- ### Release Notes <details> <summary>anthropics/claude-code-action (anthropics/claude-code-action)</summary> ### [`v1.0.201`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.201) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.200...v1.0.201) **Full Changelog**: <anthropics/claude-code-action@v1.0.200...v1.0.201> ### [`v1.0.200`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.199...v1.0.200) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.199...v1.0.200) ### [`v1.0.199`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.198...v1.0.199) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.198...v1.0.199) ### [`v1.0.198`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.197...v1.0.198) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.197...v1.0.198) ### [`v1.0.197`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.197) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.196...v1.0.197) #### What's Changed - fix: neutralize the checkout credential under actions/checkout v6+ include layout ([#​1510](https://redirect.github.com/anthropics/claude-code-action/issues/1510)) by [@​TemRevil](https://redirect.github.com/TemRevil) in [#​1526](https://redirect.github.com/anthropics/claude-code-action/pull/1526) #### New Contributors - [@​TemRevil](https://redirect.github.com/TemRevil) made their first contribution in [#​1526](https://redirect.github.com/anthropics/claude-code-action/pull/1526) **Full Changelog**: <anthropics/claude-code-action@v1.0.196...v1.0.197> ### [`v1.0.196`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.196) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.195...v1.0.196) ##### What's Changed - fix(security): unify secret redaction in public comment outputs by [@​Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) in [#​1693](https://redirect.github.com/anthropics/claude-code-action/pull/1693) - fix: strip unused ALL\_INPUTS environment variable from Claude subprocess env by [@​Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) in [#​1692](https://redirect.github.com/anthropics/claude-code-action/pull/1692) - fix(github): match bot actors in comment filters using GraphQL \_\_typename by [@​Neal006](https://redirect.github.com/Neal006) in [#​1616](https://redirect.github.com/anthropics/claude-code-action/pull/1616) ##### New Contributors - [@​Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) made their first contribution in [#​1693](https://redirect.github.com/anthropics/claude-code-action/pull/1693) **Full Changelog**: <anthropics/claude-code-action@v1.0.195...v1.0.196> ### [`v1.0.195`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.195) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.194...v1.0.195) **Full Changelog**: <anthropics/claude-code-action@v1.0.194...v1.0.195> ### [`v1.0.194`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.194) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.193...v1.0.194) #### What's Changed - Harden delete\_files MCP tool: validate paths within repo root (consistency with commit\_files) by [@​GabrielOnRails](https://redirect.github.com/GabrielOnRails) in [#​1636](https://redirect.github.com/anthropics/claude-code-action/pull/1636) - Only limit fetch depth when the checkout is already shallow by [@​winklemad](https://redirect.github.com/winklemad) in [#​1647](https://redirect.github.com/anthropics/claude-code-action/pull/1647) - fix(base-action): add \~/.local/bin to $GITHUB\_PATH after auto-install by [@​anishesg](https://redirect.github.com/anishesg) in [#​1643](https://redirect.github.com/anthropics/claude-code-action/pull/1643) - feat(context): include diffHunk in PR review comment context by [@​rishavnaskar](https://redirect.github.com/rishavnaskar) in [#​1584](https://redirect.github.com/anthropics/claude-code-action/pull/1584) - ci: skip Claude-backed test jobs on fork PRs by [@​ashwin-ant](https://redirect.github.com/ashwin-ant) in [#​1655](https://redirect.github.com/anthropics/claude-code-action/pull/1655) - fix: bump shell-quote to 1.8.4 to remediate CVE-2026-9277 by [@​doshidhaval](https://redirect.github.com/doshidhaval) in [#​1557](https://redirect.github.com/anthropics/claude-code-action/pull/1557) - fix(images): bound attachment downloads by [@​abhinavkr26104](https://redirect.github.com/abhinavkr26104) in [#​1625](https://redirect.github.com/anthropics/claude-code-action/pull/1625) #### New Contributors - [@​GabrielOnRails](https://redirect.github.com/GabrielOnRails) made their first contribution in [#​1636](https://redirect.github.com/anthropics/claude-code-action/pull/1636) - [@​winklemad](https://redirect.github.com/winklemad) made their first contribution in [#​1647](https://redirect.github.com/anthropics/claude-code-action/pull/1647) - [@​doshidhaval](https://redirect.github.com/doshidhaval) made their first contribution in [#​1557](https://redirect.github.com/anthropics/claude-code-action/pull/1557) **Full Changelog**: <anthropics/claude-code-action@v1.0.193...v1.0.194> ### [`v1.0.193`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.193) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.192...v1.0.193) **Full Changelog**: <anthropics/claude-code-action@v1.0.192...v1.0.193> ### [`v1.0.192`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.192) [Compare Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.191...v1.0.192) #### What's Changed - fix(mcp): paginate GitHub Actions results by [@​abhinavkr26104](https://redirect.github.com/abhinavkr26104) in [#​1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629) - fix(summary): keep every text block in structured tool results by [@​Neal006](https://redirect.github.com/Neal006) in [#​1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619) - fix(mcp): detect binary files by content instead of extension allowlist by [@​henriquepe](https://redirect.github.com/henriquepe) in [#​1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633) #### New Contributors - [@​abhinavkr26104](https://redirect.github.com/abhinavkr26104) made their first contribution in [#​1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629) - [@​Neal006](https://redirect.github.com/Neal006) made their first contribution in [#​1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619) - [@​henriquepe](https://redirect.github.com/henriquepe) made their first contribution in [#​1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633) **Full Changelog**: <anthropics/claude-code-action@v1.0.191...v1.0.192> </details> <details> <summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary> ### [`v10.0.1`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v10.0.1): 🌈 Tolerate transient manifest timeouts [Compare Source](https://redirect.github.com/astral-sh/setup-uv/compare/v10.0.0...v10.0.1) ##### Changes Thank you [@​arguile-](https://redirect.github.com/arguile-) for making this action more resilient. ##### 🐛 Bug fixes - Tolerate transient manifest timeouts [@​arguile-](https://redirect.github.com/arguile-) ([#​1016](https://redirect.github.com/astral-sh/setup-uv/issues/1016)) ##### 🧰 Maintenance - chore: update known checksums for 0.12.4 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​1017](https://redirect.github.com/astral-sh/setup-uv/issues/1017)) ##### 📚 Documentation - docs: update version references to v10.0.0 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​1014](https://redirect.github.com/astral-sh/setup-uv/issues/1014)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/getsentry/sentry-python). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNC4wIiwidXBkYXRlZEluVmVyIjoiNDQuMzkuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#7201) The sync request/response handler passed the _isolation_ scope to `_set_transaction_name_and_source`, but the transaction/segment span lives on the _current_ scope. As a result the route-resolved name never reached the span for sync endpoints, which were instead named by the raw URL from the ASGI middleware (`transaction_info.source` of `url` rather than `route`). Async handlers already used the current scope and were unaffected. Pass the current scope (already computed above) so sync and async handlers behave identically: - streaming: the segment name / `sentry.segment.name.source` are route-based - static: the transaction event name / source are route-based For parametrized routes this also removes high-cardinality URL transaction names for sync endpoints. Found while working on #7183.
Codecov Results 📊✅ 109876 passed | ❌ 11 failed | ⏭️ 5428 skipped | Total: 115315 | Pass Rate: 95.28% | Execution Time: 385m 40s 📊 Comparison with Base Branch
➕ New Tests (11)View new tests
➖ Removed Tests (2)View removed tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/django/init.py | 86.67% | |
| sentry_sdk/integrations/langgraph.py | 96.97% | |
| sentry_sdk/integrations/anthropic.py | 100.00% | |
| sentry_sdk/integrations/mcp.py | 100.00% |
Coverage diff
@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.22% 90.53% +0.31%
==========================================
Files 193 185 -8
Lines 25435 23930 -1505
Branches 9346 8820 -526
==========================================
+ Hits 22947 21663 -1284
- Misses 2488 2267 -221
- Partials 1434 1378 -56Generated by Codecov Action
Want to have CI run on this master -> major merge, to make sure everything is ok.