Skip to content

feat(errors): Report errors to Sentry#637

Merged
iambriccardo merged 6 commits into
mainfrom
add-sentry-errors
Mar 23, 2026
Merged

feat(errors): Report errors to Sentry#637
iambriccardo merged 6 commits into
mainfrom
add-sentry-errors

Conversation

@iambriccardo
Copy link
Copy Markdown
Contributor

@iambriccardo iambriccardo commented Mar 20, 2026

This PR adds Sentry error capturing in the state store.

Comment thread etl-replicator/src/error_notification.rs
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 20, 2026

Coverage Status

coverage: 78.055% (-0.1%) from 78.184%
when pulling f70ed58 on add-sentry-errors
into 20f9473 on main.

@iambriccardo iambriccardo marked this pull request as ready for review March 20, 2026 10:25
@iambriccardo iambriccardo requested a review from a team as a code owner March 20, 2026 10:25
Copilot AI review requested due to automatic review settings March 20, 2026 10:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ErrorReportingStateStore to report TableReplicationPhase::Errored updates to Sentry (and optionally to the existing Supabase error-notification endpoint) after state persistence.
  • Refactors Sentry event creation by extracting event_from_etl_error and adding capture_table_error with a table_id tag.
  • Adjusts where the etl_worker_errors_total counter 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.

Comment thread etl-replicator/src/sentry.rs
Comment thread etl-replicator/src/error_reporting.rs
Comment thread etl/src/workers/table_sync.rs Outdated
@iambriccardo iambriccardo merged commit a5b1f91 into main Mar 23, 2026
11 checks passed
@iambriccardo iambriccardo deleted the add-sentry-errors branch March 23, 2026 08:41
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.

4 participants