Skip to content

add sentry-sdk v2 support while keeping v1 compatibility#2

Merged
avelino merged 4 commits into
mainfrom
avelino/sentry-2
Feb 24, 2026
Merged

add sentry-sdk v2 support while keeping v1 compatibility#2
avelino merged 4 commits into
mainfrom
avelino/sentry-2

Conversation

@avelino

@avelino avelino commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

sentry-sdk v2 removed Hub-based APIs (Hub.current.get_integration, add_global_event_processor) and changed setup_once from classmethod to staticmethod, breaking the integration for anyone upgrading.

Runtime version detection picks the right API for each SDK version. setup_once and processor are now static methods (accepted by both), and the public processor alias is preserved to avoid breaking existing references. CI matrix now tests both SDK versions.

sentry-sdk v2 removed Hub-based APIs (Hub.current.get_integration,
add_global_event_processor) and changed setup_once from classmethod
to staticmethod, breaking the integration for anyone upgrading.

Runtime version detection picks the right API for each SDK version.
setup_once and processor are now static methods (accepted by both),
and the public processor alias is preserved to avoid breaking
existing references. CI matrix now tests both SDK versions.

Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
Poetry 2.x no longer installs on Python 3.8/3.9, breaking CI.
Both versions are already EOL anyway.

Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
redis-py 7.x (resolved by Poetry on CI) broke redislite: the new
_execute_command method accesses conn.port, which doesn't exist on
UnixDomainSocketConnection. redislite embeds a real Redis server
and connects via Unix sockets, making it inherently fragile against
redis-py internal changes.

Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
@avelino avelino merged commit ae65703 into main Feb 24, 2026
7 checks passed
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.

2 participants