Skip to content

Commit 0d284e9

Browse files
committed
Merge branch 'master' into major/3.0
2 parents 8e0307b + 9d9bfc4 commit 0d284e9

41 files changed

Lines changed: 7661 additions & 3691 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script defer data-domain="getsentry.github.io/sentry-python" src="https://plausible.io/js/script.js"></script>

‎pyproject.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ typing = [
7474
"pydantic-ai-slim>=2.23.0",
7575
"langchain-core>=1.5.3",
7676
"huggingface-hub>=1.26.1",
77+
"anthropic>=1.2.0",
78+
"google-genai>=2.21.0",
7779
]
7880
test = [
7981
"dataclasses ; python_full_version < '3.7'",

‎scripts/populate_tox/config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@
387387
"package": "quart",
388388
"deps": {
389389
"*": ["quart-auth", "pytest-asyncio", "pytest-forked", "Werkzeug"],
390-
">=0.19": ["quart-flask-patch"],
390+
">=0.19,<0.23": ["quart-flask-patch"],
391391
"<0.19": [
392392
"blinker<1.6",
393393
"jinja2<3.1.0",

‎scripts/populate_tox/package_dependencies.jsonl‎

Lines changed: 125 additions & 158 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/populate_tox/releases.jsonl‎

Lines changed: 29 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sentry_sdk/data_collection.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838

3939
# ``http_bodies`` defaults to this (collect everything the
4040
# platform supports); an empty list is the explicit opt-out.
41-
# response bodyies are not included here because we don't
42-
# currently capture them (as of Jul 7 2026)
41+
# ``incoming_response`` is not included here because we don't
42+
# currently capture incoming response bodies.
4343
_ALL_HTTP_BODY_TYPES = [
4444
"incoming_request",
4545
"outgoing_request",
46+
"outgoing_response",
4647
]
4748

4849
# Default number of source lines captured above and below a stack frame.

‎sentry_sdk/integrations/aiohttp.py‎

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
from sentry_sdk.integrations.logging import ignore_logger_for_events
2222
from sentry_sdk.scope import Scope, should_send_default_pii
2323
from sentry_sdk.sessions import track_session
24-
from sentry_sdk.traces import (
25-
SOURCE_FOR_STYLE as SEGMENT_SOURCE_FOR_STYLE,
26-
)
2724
from sentry_sdk.traces import (
2825
NoOpStreamedSpan,
2926
SegmentNameSource,
@@ -329,21 +326,11 @@ async def sentry_urldispatcher_resolve(
329326
pass
330327

331328
if name is not None:
332-
current_span = sentry_sdk.get_current_span()
333-
if isinstance(current_span, StreamedSpan) and not isinstance(
334-
current_span, NoOpStreamedSpan
335-
):
336-
current_span._segment.name = name
337-
current_span._segment.set_attribute(
338-
"sentry.segment.name.source",
339-
SEGMENT_SOURCE_FOR_STYLE[integration.transaction_style].value,
340-
)
341-
else:
342-
current_scope = sentry_sdk.get_current_scope()
343-
current_scope.set_transaction_name(
344-
name,
345-
source=SOURCE_FOR_STYLE[integration.transaction_style],
346-
)
329+
current_scope = sentry_sdk.get_current_scope()
330+
current_scope.set_transaction_name(
331+
name,
332+
source=SOURCE_FOR_STYLE[integration.transaction_style],
333+
)
347334

348335
return rv
349336

@@ -554,9 +541,30 @@ def aiohttp_processor(
554541
request.path,
555542
)
556543

557-
request_info["query_string"] = request.query_string
544+
if has_data_collection_enabled(client_options):
545+
if request.query_string:
546+
filtered_query_string = (
547+
_apply_data_collection_filtering_to_query_string(
548+
query_string=request.query_string,
549+
behaviour=client_options["data_collection"][
550+
"url_query_params"
551+
],
552+
)
553+
)
554+
if filtered_query_string:
555+
request_info["query_string"] = filtered_query_string
556+
else:
557+
request_info["query_string"] = request.query_string
558+
558559
request_info["method"] = request.method
559-
request_info["env"] = {"REMOTE_ADDR": request.remote}
560+
561+
# REMOTE_ADDR was unconditionally set pre-data collection, so it
562+
# continues to be set when data collection is not enabled.
563+
if (
564+
not has_data_collection_enabled(client_options)
565+
or client_options["data_collection"]["user_info"]
566+
):
567+
request_info["env"] = {"REMOTE_ADDR": request.remote}
560568
request_info["headers"] = _filter_headers(dict(request.headers))
561569

562570
# Just attach raw data here if it is within bounds, if available.

0 commit comments

Comments
 (0)