From cf23a4af15be8420316779e8eded4e326f88a340 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 24 Nov 2026 02:53:33 +0100 Subject: [PATCH 1/2] build(deps): Bump sentry-sdk to 3.0.0 Migrate off the options removed in 3.0 and keep creating issues from error logs, scrubbing local variables, and the existing message grouping. Co-Authored-By: Claude Opus 5.5 --- pyproject.toml | 2 +- src/launchpad/sentry_sdk_init.py | 14 ++++++++------ tests/integration/size/test_apple_app_sizes.py | 4 ++-- uv.lock | 10 +++++----- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 01b1ddbf..2783f817 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "rich>=14.1.0", "sentry-arroyo>=2.47.0", "sentry-options==1.2.10", - "sentry-sdk>=2.74.0", + "sentry-sdk>=3.0.0", "sortedcontainers>=2.4.0", "taskbroker-client>=0.20.38,<1", "typing-extensions>=4.15.0", diff --git a/src/launchpad/sentry_sdk_init.py b/src/launchpad/sentry_sdk_init.py index d9c830cb..e0c438b7 100644 --- a/src/launchpad/sentry_sdk_init.py +++ b/src/launchpad/sentry_sdk_init.py @@ -33,26 +33,28 @@ def initialize_sentry_sdk(config: SentryConfig | None = None) -> None: return integrations = [ - AioHttpIntegration(transaction_style="method_and_path_pattern"), + AioHttpIntegration(), AsyncioIntegration(), LoggingIntegration( - level=logging.DEBUG, # Capture debug and above as breadcrumbs + breadcrumb_level=logging.DEBUG, # Capture debug and above as breadcrumbs + event_level=logging.ERROR, # SDK 3.x no longer creates events from logs by default ), StdlibIntegration(), - ThreadingIntegration(propagate_hub=True), + ThreadingIntegration(propagate_scope=True), ] sentry_sdk.init( dsn=config.dsn, integrations=integrations, - data_collection={}, + # SDK 3.x no longer scrubs sensitive local variables by default. + data_collection={"stack_frame_variables": {"mode": "denylist"}}, + # SDK 3.x attaches stack traces to messages by default, which would regroup issues. + attach_stacktrace=False, # Release is the git sha release=config.release, # Convention is to set the Sentry environment to the region (us, de, etc). - enable_logs=True, environment=config.region, traces_sample_rate=1.0, # Low volume service, capture all traces for now - trace_lifecycle="stream", ) logger.info(f"Sentry SDK initialized for environment: {config.region}") diff --git a/tests/integration/size/test_apple_app_sizes.py b/tests/integration/size/test_apple_app_sizes.py index e2bfa0aa..dd4a3c79 100644 --- a/tests/integration/size/test_apple_app_sizes.py +++ b/tests/integration/size/test_apple_app_sizes.py @@ -244,7 +244,7 @@ def test_worker_logs_are_sent_to_sentry_under_parent_trace( monkeypatch.setenv("LAUNCHPAD_ENV", "integration") monkeypatch.setenv("SENTRY_DSN", stub.dsn) monkeypatch.setenv("SENTRY_REGION", "test") - sentry_sdk.init(dsn=stub.dsn, traces_sample_rate=1.0, enable_logs=True, trace_lifecycle="stream") + sentry_sdk.init(dsn=stub.dsn, traces_sample_rate=1.0) try: with sentry_sdk.traces.start_span(name="test") as span: AppleAppAnalyzer(skip_treemap=False, binary_analysis_workers=2).analyze( @@ -270,7 +270,7 @@ def test_worker_binary_spans_are_streamed_under_parent_span( monkeypatch.setenv("LAUNCHPAD_ENV", "integration") monkeypatch.setenv("SENTRY_DSN", stub.dsn) monkeypatch.setenv("SENTRY_REGION", "test") - sentry_sdk.init(dsn=stub.dsn, traces_sample_rate=1.0, trace_lifecycle="stream") + sentry_sdk.init(dsn=stub.dsn, traces_sample_rate=1.0) try: with sentry_sdk.traces.start_span(name="test") as span: artifact = cast(AppleArtifact, ArtifactFactory.from_path(hackernews_xcarchive)) diff --git a/uv.lock b/uv.lock index 0b264594..6eb080b6 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.14" [[package]] @@ -905,7 +905,7 @@ requires-dist = [ { name = "rich", specifier = ">=14.1.0" }, { name = "sentry-arroyo", specifier = ">=2.47.0" }, { name = "sentry-options", specifier = "==1.2.10" }, - { name = "sentry-sdk", specifier = ">=2.74.0" }, + { name = "sentry-sdk", specifier = ">=3.0.0" }, { name = "sortedcontainers", specifier = ">=2.4.0" }, { name = "taskbroker-client", specifier = ">=0.20.38,<1" }, { name = "typing-extensions", specifier = ">=4.15.0" }, @@ -2023,15 +2023,15 @@ wheels = [ [[package]] name = "sentry-sdk" -version = "2.74.0" +version = "3.0.0" source = { registry = "https://sfw.security.sentry.io/pypi/simple" } dependencies = [ { name = "certifi" }, { name = "urllib3" }, ] -sdist = { url = "https://sfw.security.sentry.io/pypi/packages/8e/7f/1b16ab4aee53cc5db976bac12e6df5d562aae3880965200cef812e7121d9/sentry_sdk-2.74.0.tar.gz", hash = "sha256:dd91d75aacaef636006b579ac3ddb2fdbc9dce35f00f4b353b6b1b110c6b256a", size = 1081514, upload-time = "2026-11-05T14:50:27.444Z" } +sdist = { url = "https://sfw.security.sentry.io/pypi/packages/63/25/54c58ddabc95f72ca32c2188247e0bf12584c0d65e117aba212afa6b54e1/sentry_sdk-3.0.0.tar.gz", hash = "sha256:daa5f0baa931dfd8c4d6844b4992764683a1abdcbad968c76703c34f0e244f13", size = 888885, upload-time = "2026-11-23T09:30:35.104Z" } wheels = [ - { url = "https://sfw.security.sentry.io/pypi/packages/55/b1/736d4b4b308694b0071844a533522ac06669ad61751687b94edfbf863f17/sentry_sdk-2.74.0-py3-none-any.whl", hash = "sha256:40b205af015649df3ec9986e057ce24ce85956bee3fb75efa72c93aa7036bdff", size = 549800, upload-time = "2026-11-05T14:50:25.767Z" }, + { url = "https://sfw.security.sentry.io/pypi/packages/2e/4b/69643d19c9954f930a03deb06e3f80c57b2d6ecb325bdc9ca3fa1b6d1d30/sentry_sdk-3.0.0-py3-none-any.whl", hash = "sha256:22cfcdb11b494e8efa82a48edd655afdf99179df37f2ed37f18846b938455c36", size = 472979, upload-time = "2026-11-23T09:30:33.705Z" }, ] [package.optional-dependencies] From 28a473be4af0c47253187034623ca04a5d35552d Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 24 Nov 2026 03:57:05 +0100 Subject: [PATCH 2/2] build(deps): Bump devservices to 1.5.5 Earlier releases import an API removed in sentry-sdk 3.0 and crash on startup. Co-Authored-By: Claude Opus 5.5 --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 6eb080b6..17b279a0 100644 --- a/uv.lock +++ b/uv.lock @@ -528,7 +528,7 @@ wheels = [ [[package]] name = "devservices" -version = "1.4.0" +version = "1.5.5" source = { registry = "https://sfw.security.sentry.io/pypi/simple" } dependencies = [ { name = "packaging" }, @@ -537,9 +537,9 @@ dependencies = [ { name = "sentry-sdk" }, { name = "supervisor" }, ] -sdist = { url = "https://sfw.security.sentry.io/pypi/packages/09/b2/61f40aad0188fd929dea9ee34b1971dc0b278bde18207135fe88d4e157d6/devservices-1.4.0.tar.gz", hash = "sha256:c81af757ed8612424461dbc1c519950503e2f48d72b8a10a7cd7c2503126124d", size = 93621, upload-time = "2026-06-02T16:17:16.164Z" } +sdist = { url = "https://sfw.security.sentry.io/pypi/packages/ab/86/107895dc3be3b716254a12d00bbcb8613830e12ec1b94c1199d0f6fe66ed/devservices-1.5.5.tar.gz", hash = "sha256:810b0064380dd19639e11b5049041bc70f9d59535e13aaebb9b7943073d3b1e0", size = 98692, upload-time = "2026-10-29T17:21:36.941Z" } wheels = [ - { url = "https://sfw.security.sentry.io/pypi/packages/56/9f/62b0fea6019fbf60ae726a4ba6d85efa679cb1145eefbc81646afdac485c/devservices-1.4.0-py3-none-any.whl", hash = "sha256:259b2cbf8f129474cddcef2d952e1b23a22d274ea50cca816db4c97789bfbf8c", size = 120995, upload-time = "2026-06-02T16:17:14.97Z" }, + { url = "https://sfw.security.sentry.io/pypi/packages/fd/fd/3eec1abd642d5241cdfdb3e11b0d4008c0dba42141c6abf2d8f567607d46/devservices-1.5.5-py3-none-any.whl", hash = "sha256:7b88327c7e55340c89c65530c069c95e3a813d15f7350afa0041fc7256b316fb", size = 127038, upload-time = "2026-10-29T17:21:35.668Z" }, ] [[package]]