Conversation
ZacLou
force-pushed
the
feat/sentry-error-tracking-478
branch
from
September 5, 2026 15:56
30f6807 to
5c4f34b
Compare
…tocol#478) Adds a lightweight error tracking layer that captures unhandled errors, ErrorBoundary catches, and failed RPC calls with breadcrumbs. Gated on NEXT_PUBLIC_SENTRY_DSN — when unset, all functions are no-ops. - lib/error-tracking.ts: captureError, addBreadcrumb, withErrorTracking, initErrorTracking (no-ops when DSN is unset) - app/layout.tsx: calls initErrorTracking() on mount - components/ErrorBoundary.tsx: captures errors with component stack - app/streams/page.tsx, app/dashboard/page.tsx: captures RPC errors - .env.example: documents NEXT_PUBLIC_SENTRY_DSN The API is structured so adding @sentry/nextjs is a one-line change in captureError() — just replace the console.error with Sentry calls. Addresses conduit-protocol#478
ZacLou
force-pushed
the
feat/sentry-error-tracking-478
branch
from
September 5, 2026 15:58
5c4f34b to
c386530
Compare
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.
Summary
Addresses #478
Changes
lib/error-tracking.ts(new)A lightweight error tracking wrapper with four functions:
captureError(error, context?)— captures an error with optional tags and extra data. When Sentry DSN is unset, logs to console. When set, would callSentry.captureException()(structured for one-line upgrade).addBreadcrumb(crumb)— adds breadcrumbs (max 20) attached to the next captured errorwithErrorTracking(fn, context?)— wraps an async function so errors are automatically capturedinitErrorTracking()— installsunhandledrejectionanderrorlisteners onwindowAll functions are no-ops when
NEXT_PUBLIC_SENTRY_DSNis unset — the app runs identically with or without Sentry configured.Wiring
app/layout.tsx— callsinitErrorTracking()on mountcomponents/ErrorBoundary.tsx—componentDidCatchcallscaptureError()with component stackapp/streams/page.tsx— RPC errors captured withsource: 'streams-page'tagapp/dashboard/page.tsx— RPC errors captured withsource: 'dashboard-page'tag.env.example— documentsNEXT_PUBLIC_SENTRY_DSNUpgrade path
When
@sentry/nextjsis installed, onlycaptureError()needs to change:No other code changes needed.