Skip to content

Add sentry integration - #285

Open
MaxAlex wants to merge 12 commits into
mainfrom
add_sentry_integration
Open

Add sentry integration#285
MaxAlex wants to merge 12 commits into
mainfrom
add_sentry_integration

Conversation

@MaxAlex

@MaxAlex MaxAlex commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Adds Sentry integration to Odin. In theory, this just requires adding a sentry_sdk.init() call and everything will just work. There are a few complications:

  • Sentry initialization modifies exception handling infrastructure in the current Python process, so this doesn't carry over into subprocesses (such as those used to run OdinJob via multiprocessing.) There's a couple ways to address this, of which the simplest is to just call have OdinJob call init() for every subprocess.
  • Sentry ingests errors in two ways; either by parsing error output from logs, or by explicit calls to functions like sentry_sdk.capture_exception. The problem with the former method is that Sentry's error parsing doesn't seem to be very good, and doesn't seem to like our current logging infrastructure, so a single exception will wind up smeared into a dozen or so Sentry incident reports. This would be difficult to fix without significantly changing how logs appear in Splunk, so to keep things consistent I've put in a try-except that calls sentry_sdk.capture_exception in job.py, and disabled log-parsing-based Sentry reports there. Importantly, errors outside of an OdinJob will still be reported from logs.
  • cubic_archive.py would previously report missing snapshot data for a table by throwing an exception. Since some tables aren't being sent over in dev this has been constantly emitting alerts, which we've been ignoring. It would also be a constantly-updated Sentry report, so this PR suppresses that 'error.'

@MaxAlex
MaxAlex force-pushed the add_sentry_integration branch from f44eb54 to 98a6808 Compare August 28, 2026 20:56
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