Skip to content

[MIG] sentry: Migration to 19.0#3545

Open
JustineBlanchet wants to merge 2 commits intoOCA:19.0from
JustineBlanchet:19.0-mig-sentry
Open

[MIG] sentry: Migration to 19.0#3545
JustineBlanchet wants to merge 2 commits intoOCA:19.0from
JustineBlanchet:19.0-mig-sentry

Conversation

@JustineBlanchet
Copy link

Summary

Port of the sentry module from 18.0 to 19.0.

This module allows painless Sentry integration with Odoo by reporting errors to the Sentry error tracking platform.

Changes from 18.0

Breaking changes (sentry-sdk 2.0+)

  • ThreadingIntegration: Removed deprecated propagate_hub=True parameter, which was removed in sentry-sdk 2.0 as part of the Hub/Scope unification. The new unified Scope model handles thread propagation automatically.
  • new_scope(): Replaced the deprecated push_scope() context manager with new_scope(), which is the correct API in sentry-sdk 2.0+.

Improvements

  • DEFAULT_OPTIONS access: Made defensive using .get(key, fallback) instead of direct dict access (DEFAULT_OPTIONS[key]), ensuring forward compatibility when sentry-sdk adds or renames options in future releases.
  • sentry_sdk version constraint: Removed upper bound (<=2.22.0), keeping only >=2.0.0 to allow seamless updates.
  • Deprecated transport option: Removed from get_sentry_options() since it was already deprecated in 18.0 and is no longer relevant in sentry-sdk 2.0+ (HttpTransport is the default).
  • development_status: Added Beta as required by OCA manifest conventions.
  • README.rst: Regenerated with oca-gen-addon-readme targeting the 19.0 branch.

Test plan

  • Install sentry-sdk>=2.0.0
  • Add sentry to server_wide_modules in odoo.conf
  • Configure sentry_enabled = true and sentry_dsn = ... in odoo.conf
  • Start Odoo and verify the "Starting Odoo Server" message appears in Sentry
  • Trigger an error and verify it is captured in Sentry
  • Verify that odoo.exceptions.UserError and other ignored exceptions are NOT reported

Links

Made with Cursor

Port of the sentry module from 18.0 to 19.0.

Changes:
- Bump version to 19.0.1.0.0
- Add development_status: Beta
- Remove sentry_sdk version upper bound (>=2.0.0)
- Fix ThreadingIntegration: remove deprecated propagate_hub=True parameter
  removed in sentry-sdk 2.0 with the Hub/Scope unification
- Replace push_scope() with new_scope() (sentry-sdk 2.0+ API)
- Access DEFAULT_OPTIONS defensively with .get() and fallback values
  to ensure forward compatibility with future sentry-sdk releases
- Remove deprecated transport option
- Update README.rst for 19.0 (oca-gen-addon-readme)

Made-with: Cursor
- Apply ruff formatting: collapse short SentryOption lines
- Add sentry_sdk>=2.0.0 to requirements.txt (oca-gen-external-dependencies)

Made-with: Cursor
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.

1 participant