Skip to content

Fix background tasks failing with sentry-sdk 3 - #4514

Merged
peterschmidt85 merged 1 commit into
masterfrom
issue_4513_sentry_sdk_3
Nov 24, 2026
Merged

peterschmidt85 merged 1 commit into
masterfrom
issue_4513_sentry_sdk_3

Conversation

@peterschmidt85

Copy link
Copy Markdown
Contributor

New environments install sentry-sdk 3.0.0, released on 2026-11-23, and the server then fails: every pipeline and scheduled task raises AttributeError: module 'sentry_sdk' has no attribute 'start_transaction', so runs, instances, fleets, gateways and volumes are not processed. With DSTACK_SENTRY_DSN set, sentry_sdk.init raises TypeError: Unknown option 'enable_tracing'. pyright fails in CI for the same calls.

  • sentry-sdk is now required below 3. With it, a new environment gets 2.76.0, the tasks run, and a server started from this branch logs no errors.

Released versions have the same open requirement, so installations made after the sentry-sdk release are affected until a release with this fix; pip install "sentry-sdk<3" works around it.

Moving the server to the sentry-sdk 3 API (start_span, traces_sample_rate, profile_session_sample_rate) is left for a separate change.

Fixes #4513.

🤖 Generated with Claude Code

sentry-sdk 3.0.0, released on 2026-11-23, removed
`sentry_sdk.start_transaction` and the `enable_tracing` and
`profiles_sample_rate` options. `pyproject.toml` had no upper bound, so
new environments installed it: every pipeline and scheduled task of the
server failed with `AttributeError`, `sentry_sdk.init` failed with
`TypeError` when a DSN is set, and pyright failed in CI.

Require sentry-sdk below 3 until the server moves to its new API.

Fixes #4513.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@peterschmidt85
peterschmidt85 merged commit 77f28a4 into master Nov 24, 2026
26 checks passed
@peterschmidt85
peterschmidt85 deleted the issue_4513_sentry_sdk_3 branch November 24, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Server background tasks fail with sentry-sdk 3.0.0

2 participants