Skip to content

Commit 04add55

Browse files
committed
Merge branch 'master' into potel-base
2 parents 07ba0f0 + 9261b2c commit 04add55

31 files changed

+527
-146
lines changed

.github/workflows/test-integrations-ai.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
coverage xml
7171
- name: Upload coverage to Codecov
7272
if: ${{ !cancelled() }}
73-
uses: codecov/[email protected].2
73+
uses: codecov/[email protected].3
7474
with:
7575
token: ${{ secrets.CODECOV_TOKEN }}
7676
files: coverage.xml
@@ -132,7 +132,7 @@ jobs:
132132
coverage xml
133133
- name: Upload coverage to Codecov
134134
if: ${{ !cancelled() }}
135-
uses: codecov/[email protected].2
135+
uses: codecov/[email protected].3
136136
with:
137137
token: ${{ secrets.CODECOV_TOKEN }}
138138
files: coverage.xml

.github/workflows/test-integrations-cloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
coverage xml
7575
- name: Upload coverage to Codecov
7676
if: ${{ !cancelled() }}
77-
uses: codecov/[email protected].2
77+
uses: codecov/[email protected].3
7878
with:
7979
token: ${{ secrets.CODECOV_TOKEN }}
8080
files: coverage.xml
@@ -140,7 +140,7 @@ jobs:
140140
coverage xml
141141
- name: Upload coverage to Codecov
142142
if: ${{ !cancelled() }}
143-
uses: codecov/[email protected].2
143+
uses: codecov/[email protected].3
144144
with:
145145
token: ${{ secrets.CODECOV_TOKEN }}
146146
files: coverage.xml

.github/workflows/test-integrations-common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
coverage xml
5555
- name: Upload coverage to Codecov
5656
if: ${{ !cancelled() }}
57-
uses: codecov/[email protected].2
57+
uses: codecov/[email protected].3
5858
with:
5959
token: ${{ secrets.CODECOV_TOKEN }}
6060
files: coverage.xml

.github/workflows/test-integrations-dbs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
coverage xml
9595
- name: Upload coverage to Codecov
9696
if: ${{ !cancelled() }}
97-
uses: codecov/[email protected].2
97+
uses: codecov/[email protected].3
9898
with:
9999
token: ${{ secrets.CODECOV_TOKEN }}
100100
files: coverage.xml
@@ -180,7 +180,7 @@ jobs:
180180
coverage xml
181181
- name: Upload coverage to Codecov
182182
if: ${{ !cancelled() }}
183-
uses: codecov/[email protected].2
183+
uses: codecov/[email protected].3
184184
with:
185185
token: ${{ secrets.CODECOV_TOKEN }}
186186
files: coverage.xml

.github/workflows/test-integrations-flags.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
coverage xml
6767
- name: Upload coverage to Codecov
6868
if: ${{ !cancelled() }}
69-
uses: codecov/[email protected].2
69+
uses: codecov/[email protected].3
7070
with:
7171
token: ${{ secrets.CODECOV_TOKEN }}
7272
files: coverage.xml

.github/workflows/test-integrations-gevent.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
coverage xml
5555
- name: Upload coverage to Codecov
5656
if: ${{ !cancelled() }}
57-
uses: codecov/[email protected].2
57+
uses: codecov/[email protected].3
5858
with:
5959
token: ${{ secrets.CODECOV_TOKEN }}
6060
files: coverage.xml

.github/workflows/test-integrations-graphql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
coverage xml
6767
- name: Upload coverage to Codecov
6868
if: ${{ !cancelled() }}
69-
uses: codecov/[email protected].2
69+
uses: codecov/[email protected].3
7070
with:
7171
token: ${{ secrets.CODECOV_TOKEN }}
7272
files: coverage.xml

.github/workflows/test-integrations-misc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
coverage xml
7575
- name: Upload coverage to Codecov
7676
if: ${{ !cancelled() }}
77-
uses: codecov/[email protected].2
77+
uses: codecov/[email protected].3
7878
with:
7979
token: ${{ secrets.CODECOV_TOKEN }}
8080
files: coverage.xml

.github/workflows/test-integrations-network.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
coverage xml
6363
- name: Upload coverage to Codecov
6464
if: ${{ !cancelled() }}
65-
uses: codecov/[email protected].2
65+
uses: codecov/[email protected].3
6666
with:
6767
token: ${{ secrets.CODECOV_TOKEN }}
6868
files: coverage.xml
@@ -116,7 +116,7 @@ jobs:
116116
coverage xml
117117
- name: Upload coverage to Codecov
118118
if: ${{ !cancelled() }}
119-
uses: codecov/[email protected].2
119+
uses: codecov/[email protected].3
120120
with:
121121
token: ${{ secrets.CODECOV_TOKEN }}
122122
files: coverage.xml

.github/workflows/test-integrations-tasks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
coverage xml
8585
- name: Upload coverage to Codecov
8686
if: ${{ !cancelled() }}
87-
uses: codecov/[email protected].2
87+
uses: codecov/[email protected].3
8888
with:
8989
token: ${{ secrets.CODECOV_TOKEN }}
9090
files: coverage.xml
@@ -160,7 +160,7 @@ jobs:
160160
coverage xml
161161
- name: Upload coverage to Codecov
162162
if: ${{ !cancelled() }}
163-
uses: codecov/[email protected].2
163+
uses: codecov/[email protected].3
164164
with:
165165
token: ${{ secrets.CODECOV_TOKEN }}
166166
files: coverage.xml

.github/workflows/test-integrations-web-1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
coverage xml
8585
- name: Upload coverage to Codecov
8686
if: ${{ !cancelled() }}
87-
uses: codecov/[email protected].2
87+
uses: codecov/[email protected].3
8888
with:
8989
token: ${{ secrets.CODECOV_TOKEN }}
9090
files: coverage.xml

.github/workflows/test-integrations-web-2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
coverage xml
9191
- name: Upload coverage to Codecov
9292
if: ${{ !cancelled() }}
93-
uses: codecov/[email protected].2
93+
uses: codecov/[email protected].3
9494
with:
9595
token: ${{ secrets.CODECOV_TOKEN }}
9696
files: coverage.xml
@@ -172,7 +172,7 @@ jobs:
172172
coverage xml
173173
- name: Upload coverage to Codecov
174174
if: ${{ !cancelled() }}
175-
uses: codecov/[email protected].2
175+
uses: codecov/[email protected].3
176176
with:
177177
token: ${{ secrets.CODECOV_TOKEN }}
178178
files: coverage.xml

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,43 @@ for your feedback. How was the migration? Is everything working as expected? Is
2020
[on GitHub](https://github.com/getsentry/sentry-python/discussions/3936) or
2121
[on Discord](https://discord.gg/wdNEHETs87).
2222

23+
## 2.29.1
24+
25+
### Various fixes & improvements
26+
27+
- fix(logs): send `severity_text`: `warn` instead of `warning` (#4396) by @lcian
28+
29+
## 2.29.0
30+
31+
### Various fixes & improvements
32+
33+
- fix(loguru): Move integration setup from `__init__` to `setup_once` (#4399) by @sentrivana
34+
- feat: Allow configuring `keep_alive` via environment variable (#4366) by @szokeasaurusrex
35+
- fix(celery): Do not send extra check-in (#4395) by @sentrivana
36+
- fix(typing): Add before_send_log to Experiments (#4383) by @sentrivana
37+
- ci: Fix pyspark test suite (#4382) by @sentrivana
38+
- fix(logs): Make `sentry.message.parameters` singular as per spec (#4387) by @AbhiPrasad
39+
- apidocs: Remove snowballstemmer pin (#4379) by @sentrivana
40+
41+
## 2.28.0
42+
43+
### Various fixes & improvements
44+
45+
- fix(logs): Forward `extra` from logger as attributes (#4374) by @AbhiPrasad
46+
- fix(logs): Canonicalize paths from the logger integration (#4336) by @colin-sentry
47+
- fix(logs): Use new transport (#4317) by @colin-sentry
48+
- fix: Deprecate `set_measurement()` API. (#3934) by @antonpirker
49+
- fix: Put feature flags on isolation scope (#4363) by @antonpirker
50+
- fix: Make use of `SPANDATA` consistent (#4373) by @antonpirker
51+
- fix: Discord link (#4371) by @sentrivana
52+
- tests: Pin snowballstemmer for now (#4372) by @sentrivana
53+
- tests: Regular tox update (#4367) by @sentrivana
54+
- tests: Bump test timeout for recursion stacktrace extract to 2s (#4351) by @booxter
55+
- tests: Fix test_stacktrace_big_recursion failure due to argv (#4346) by @booxter
56+
- tests: Move anthropic under toxgen (#4348) by @sentrivana
57+
- tests: Update tox.ini (#4347) by @sentrivana
58+
- chore: Update GH issue templates for Linear compatibility (#4328) by @stephanie-anderson
59+
- chore: Bump actions/create-github-app-token from 2.0.2 to 2.0.6 (#4358) by @dependabot
2360

2461
## 2.27.0
2562

requirements-docs.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ shibuya
33
sphinx<8.2
44
sphinx-autodoc-typehints[type_comments]>=1.8.0
55
typing-extensions
6-
snowballstemmer<3.0

scripts/split_tox_gh_actions/templates/test_group.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
- name: Upload coverage to Codecov
7979
if: {% raw %}${{ !cancelled() }}{% endraw %}
80-
uses: codecov/[email protected].2
80+
uses: codecov/[email protected].3
8181
with:
8282
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}
8383
files: coverage.xml

sentry_sdk/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ def _get_options(*args, **kwargs):
133133
)
134134
rv["socket_options"] = None
135135

136+
if rv["keep_alive"] is None:
137+
rv["keep_alive"] = (
138+
env_to_bool(os.environ.get("SENTRY_KEEP_ALIVE"), strict=True) or False
139+
)
140+
136141
return rv
137142

138143

sentry_sdk/consts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import itertools
2-
32
from enum import Enum
43
from typing import TYPE_CHECKING
54

@@ -47,6 +46,7 @@ class CompressionAlgo(Enum):
4746
Event,
4847
EventProcessor,
4948
Hint,
49+
Log,
5050
ProfilerMode,
5151
TracesSampler,
5252
TransactionProcessor,
@@ -71,6 +71,7 @@ class CompressionAlgo(Enum):
7171
"transport_num_pools": Optional[int],
7272
"transport_http2": Optional[bool],
7373
"enable_logs": Optional[bool],
74+
"before_send_log": Optional[Callable[[Log, Hint], Optional[Log]]],
7475
},
7576
total=False,
7677
)
@@ -622,7 +623,7 @@ def __init__(
622623
ignore_errors=[], # type: Sequence[Union[type, str]] # noqa: B006
623624
max_request_body_size="medium", # type: str
624625
socket_options=None, # type: Optional[List[Tuple[int, int, int | bytes]]]
625-
keep_alive=False, # type: bool
626+
keep_alive=None, # type: Optional[bool]
626627
before_send=None, # type: Optional[EventProcessor]
627628
before_breadcrumb=None, # type: Optional[BreadcrumbProcessor]
628629
debug=None, # type: Optional[bool]

sentry_sdk/integrations/celery/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from sentry_sdk.integrations import _check_minimum_version, Integration, DidNotEnable
99
from sentry_sdk.integrations.celery.beat import (
1010
_patch_beat_apply_entry,
11-
_patch_redbeat_maybe_due,
11+
_patch_redbeat_apply_async,
1212
_setup_celery_beat_signals,
1313
)
1414
from sentry_sdk.integrations.celery.utils import _now_seconds_since_epoch
@@ -72,7 +72,7 @@ def __init__(
7272
self.exclude_beat_tasks = exclude_beat_tasks
7373

7474
_patch_beat_apply_entry()
75-
_patch_redbeat_maybe_due()
75+
_patch_redbeat_apply_async()
7676
_setup_celery_beat_signals(monitor_beat_tasks)
7777

7878
@staticmethod

sentry_sdk/integrations/celery/beat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ def _patch_beat_apply_entry():
202202
Scheduler.apply_entry = _wrap_beat_scheduler(Scheduler.apply_entry)
203203

204204

205-
def _patch_redbeat_maybe_due():
205+
def _patch_redbeat_apply_async():
206206
# type: () -> None
207207
if RedBeatScheduler is None:
208208
return
209209

210-
RedBeatScheduler.maybe_due = _wrap_beat_scheduler(RedBeatScheduler.maybe_due)
210+
RedBeatScheduler.apply_async = _wrap_beat_scheduler(RedBeatScheduler.apply_async)
211211

212212

213213
def _setup_celery_beat_signals(monitor_beat_tasks):

sentry_sdk/integrations/logging.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,23 +353,21 @@ def emit(self, record):
353353
if not client.options["_experiments"].get("enable_logs", False):
354354
return
355355

356-
SentryLogsHandler._capture_log_from_record(client, record)
356+
self._capture_log_from_record(client, record)
357357

358-
@staticmethod
359-
def _capture_log_from_record(client, record):
358+
def _capture_log_from_record(self, client, record):
360359
# type: (BaseClient, LogRecord) -> None
361360
scope = sentry_sdk.get_current_scope()
362361
otel_severity_number, otel_severity_text = _python_level_to_otel(record.levelno)
363362
project_root = client.options["project_root"]
364-
attrs = {
365-
"sentry.origin": "auto.logger.log",
366-
} # type: dict[str, str | bool | float | int]
363+
attrs = self._extra_from_record(record) # type: Any
364+
attrs["sentry.origin"] = "auto.logger.log"
367365
if isinstance(record.msg, str):
368366
attrs["sentry.message.template"] = record.msg
369367
if record.args is not None:
370368
if isinstance(record.args, tuple):
371369
for i, arg in enumerate(record.args):
372-
attrs[f"sentry.message.parameters.{i}"] = (
370+
attrs[f"sentry.message.parameter.{i}"] = (
373371
arg
374372
if isinstance(arg, str)
375373
or isinstance(arg, float)

0 commit comments

Comments
 (0)