feat(errors): Report errors to Sentry#637
Merged
Merged
Conversation
iambriccardo
commented
Mar 20, 2026
srcCraftsman
approved these changes
Mar 20, 2026
There was a problem hiding this comment.
Pull request overview
Adds Sentry-based error reporting for persisted table replication errors by decorating the replicator state store, and refactors Sentry event construction to better handle EtlError.
Changes:
- Introduces
ErrorReportingStateStoreto reportTableReplicationPhase::Erroredupdates to Sentry (and optionally to the existing Supabase error-notification endpoint) after state persistence. - Refactors Sentry event creation by extracting
event_from_etl_errorand addingcapture_table_errorwith atable_idtag. - Adjusts where the
etl_worker_errors_totalcounter is incremented in the table sync worker.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| etl/src/workers/table_sync.rs | Moves worker error metric emission within the error-handling flow. |
| etl-replicator/src/sentry.rs | Adds table-error capture and refactors Sentry event creation for EtlError/backtraces. |
| etl-replicator/src/main.rs | Registers the new error_reporting module. |
| etl-replicator/src/error_reporting.rs | Adds a state store decorator that reports persisted table errors to Sentry/notifications. |
| etl-replicator/src/error_notification.rs | Removes the previous state store wrapper (notification-only) now replaced by error_reporting. |
| etl-replicator/src/core.rs | Wires ErrorReportingStateStore into replicator initialization and destination scope tagging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Sentry error capturing in the state store.