Skip to content

Commit 17b77be

Browse files
committed
Merge branch 'master' into antonpirker/fix-streaming-response
2 parents d2c44c7 + a7c2d70 commit 17b77be

File tree

6 files changed

+59
-6
lines changed

6 files changed

+59
-6
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## 2.19.0
4+
5+
### Various fixes & improvements
6+
7+
- New: introduce `rust_tracing` integration. See https://docs.sentry.io/platforms/python/integrations/rust_tracing/ (#3717) by @matt-codecov
8+
- Auto enable Litestar integration (#3540) by @provinzkraut
9+
- Deprecate `sentry_sdk.init` context manager (#3729) by @szokeasaurusrex
10+
- feat(spotlight): Send PII to Spotlight when no DSN is set (#3804) by @BYK
11+
- feat(spotlight): Add info logs when Sentry is enabled (#3735) by @BYK
12+
- feat(spotlight): Inject Spotlight button on Django (#3751) by @BYK
13+
- feat(spotlight): Auto enable cache_spans for Spotlight on DEBUG (#3791) by @BYK
14+
- fix(logging): Handle parameter `stack_info` for the `LoggingIntegration` (#3745) by @gmcrocetti
15+
- fix(pure-eval): Make sentry-sdk[pure-eval] installable with pip==24.0 (#3757) by @sentrivana
16+
- fix(rust_tracing): include_tracing_fields arg to control unvetted data in rust_tracing integration (#3780) by @matt-codecov
17+
- fix(aws) Fix aws lambda tests (by reducing event size) (#3770) by @antonpirker
18+
- fix(arq): fix integration with Worker settings as a dict (#3742) by @saber-solooki
19+
- fix(httpx): Prevent Sentry baggage duplication (#3728) by @szokeasaurusrex
20+
- fix(falcon): Don't exhaust request body stream (#3768) by @szokeasaurusrex
21+
- fix(integrations): Check `retries_left` before capturing exception (#3803) by @malkovro
22+
- fix(openai): Use name instead of description (#3807) by @sourceful-rob
23+
- test(gcp): Only run GCP tests when they should (#3721) by @szokeasaurusrex
24+
- chore: Shorten CI workflow names (#3805) by @sentrivana
25+
- chore: Test with pyspark prerelease (#3760) by @sentrivana
26+
- build(deps): bump codecov/codecov-action from 4.6.0 to 5.0.2 (#3792) by @dependabot
27+
- build(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#3691) by @dependabot
28+
329
## 2.18.0
430

531
### Various fixes & improvements

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
copyright = "2019-{}, Sentry Team and Contributors".format(datetime.now().year)
3232
author = "Sentry Team and Contributors"
3333

34-
release = "2.18.0"
34+
release = "2.19.0"
3535
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3636

3737

sentry_sdk/client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ def _get_options(*args, **kwargs):
128128
rv["traces_sample_rate"] = 1.0
129129

130130
if rv["event_scrubber"] is None:
131-
rv["event_scrubber"] = EventScrubber(send_default_pii=rv["send_default_pii"])
131+
rv["event_scrubber"] = EventScrubber(
132+
send_default_pii=(
133+
False if rv["send_default_pii"] is None else rv["send_default_pii"]
134+
)
135+
)
132136

133137
if rv["socket_options"] and not isinstance(rv["socket_options"], list):
134138
logger.warning(
@@ -451,7 +455,11 @@ def should_send_default_pii(self):
451455
452456
Returns whether the client should send default PII (Personally Identifiable Information) data to Sentry.
453457
"""
454-
return self.options.get("send_default_pii", False)
458+
result = self.options.get("send_default_pii")
459+
if result is None:
460+
result = not self.options["dsn"] and self.spotlight is not None
461+
462+
return result
455463

456464
@property
457465
def dsn(self):

sentry_sdk/consts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ class OP:
489489
# This type exists to trick mypy and PyCharm into thinking `init` and `Client`
490490
# take these arguments (even though they take opaque **kwargs)
491491
class ClientConstructor:
492+
492493
def __init__(
493494
self,
494495
dsn=None, # type: Optional[str]
@@ -506,7 +507,7 @@ def __init__(
506507
transport=None, # type: Optional[Union[sentry_sdk.transport.Transport, Type[sentry_sdk.transport.Transport], Callable[[Event], None]]]
507508
transport_queue_size=DEFAULT_QUEUE_SIZE, # type: int
508509
sample_rate=1.0, # type: float
509-
send_default_pii=False, # type: bool
510+
send_default_pii=None, # type: Optional[bool]
510511
http_proxy=None, # type: Optional[str]
511512
https_proxy=None, # type: Optional[str]
512513
ignore_errors=[], # type: Sequence[Union[type, str]] # noqa: B006
@@ -575,4 +576,4 @@ def _get_default_options():
575576
del _get_default_options
576577

577578

578-
VERSION = "2.18.0"
579+
VERSION = "2.19.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_file_text(file_name):
2121

2222
setup(
2323
name="sentry-sdk",
24-
version="2.18.0",
24+
version="2.19.0",
2525
author="Sentry Team and Contributors",
2626
author_email="[email protected]",
2727
url="https://github.com/getsentry/sentry-python",

tests/test_scope.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,24 @@ def test_should_send_default_pii_false(sentry_init):
811811
assert should_send_default_pii() is False
812812

813813

814+
def test_should_send_default_pii_default_false(sentry_init):
815+
sentry_init()
816+
817+
assert should_send_default_pii() is False
818+
819+
820+
def test_should_send_default_pii_false_with_dsn_and_spotlight(sentry_init):
821+
sentry_init(dsn="http://key@localhost/1", spotlight=True)
822+
823+
assert should_send_default_pii() is False
824+
825+
826+
def test_should_send_default_pii_true_without_dsn_and_spotlight(sentry_init):
827+
sentry_init(spotlight=True)
828+
829+
assert should_send_default_pii() is True
830+
831+
814832
def test_set_tags():
815833
scope = Scope()
816834
scope.set_tags({"tag1": "value1", "tag2": "value2"})

0 commit comments

Comments
 (0)