Skip to content

Add sentry SDK to the rust arroyo adapter#316

Open
fpacifici wants to merge 2 commits into
mainfrom
fpacifici/fix_sentry_int
Open

Add sentry SDK to the rust arroyo adapter#316
fpacifici wants to merge 2 commits into
mainfrom
fpacifici/fix_sentry_int

Conversation

@fpacifici
Copy link
Copy Markdown
Collaborator

We integrated the sentry sdk in the streaming pipeline code and the adapter
code but that does not cover anything happening in rust.

  1. The rust consumer catches any panic and swallows them. So these errors do not go to the python code
  2. Anyway when an arroyo strategy panics nothing is surfaced to send to python. See StrategyPanic
  3. Also the rust_arroyo adapter does not crash if the consumer fails. It termiantes with error code 0.

This does not address step 3, but it introduces a sentry integration in the rust code.
The guard is created at the beginning of the run method.
The integration can be configured separately from the main pipeline sdk.
This separation gives us some ways to separate what goes wrong in the application from
what goes on in the adapter code.
It is by no means a precise separation but we can start trying this way.

In the current state:

  • IF the product code rasies an error we would see it in both integrations
  • If the strategy fails in the rust code, the error would go to the adapter integration only.

@fpacifici fpacifici requested a review from a team as a code owner May 9, 2026 00:06
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d4bd943. Configure here.

Comment thread sentry_streams/sentry_streams/adapters/arroyo/rust_arroyo.py Outdated
Comment on lines +160 to +161
release: sentry::release_name!(),
..Default::default()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to set the environment as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. Will do

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.

3 participants