Skip to content

docs(suspensive.org): add Sentry error monitoring - #1977

Merged
manudeli merged 1 commit into
mainfrom
feat/suspensive-org-sentry-monitoring
Jun 29, 2026
Merged

docs(suspensive.org): add Sentry error monitoring#1977
manudeli merged 1 commit into
mainfrom
feat/suspensive-org-sentry-monitoring

Conversation

@manudeli

Copy link
Copy Markdown
Contributor

Integrate @sentry/nextjs to monitor the docs site's health:

  • Capture client, server, and edge runtime errors via instrumentation files and a global-error boundary
  • Record Web Vitals (performance) through Sentry browser tracing
  • Wire Suspensive's own to Sentry.captureReactException
  • Tunnel events through /monitoring to dodge ad blockers, and exclude that path from the i18n proxy matcher
  • Sample 100% in dev / 10% in production to stay within quota

Sentry stays disabled until NEXT_PUBLIC_SENTRY_DSN is set, so local builds and PRs are unaffected.

Overview

PR Checklist

  • I did below actions if need
  1. I read the Contributing Guide
  2. I added documents and tests.

Integrate @sentry/nextjs to monitor the docs site's health:

- Capture client, server, and edge runtime errors via instrumentation
  files and a global-error boundary
- Record Web Vitals (performance) through Sentry browser tracing
- Wire Suspensive's own <ErrorBoundary onError> to Sentry.captureReactException
- Tunnel events through /monitoring to dodge ad blockers, and exclude
  that path from the i18n proxy matcher
- Sample 100% in dev / 10% in production to stay within quota

Sentry stays disabled until NEXT_PUBLIC_SENTRY_DSN is set, so local
builds and PRs are unaffected.
@manudeli
manudeli requested a review from kangju2000 as a code owner June 29, 2026 14:47
@coauthors

coauthors Bot commented Jun 29, 2026

Copy link
Copy Markdown

People can be co-author:

Candidate Reasons Count Add this as commit message
@manudeli #1977 1 Co-authored-by: manudeli <61593290+manudeli@users.noreply.github.com>
@codecov-commenter #1977 (comment) 1 Co-authored-by: codecov-commenter <65553080+codecov-commenter@users.noreply.github.com>

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b95c245

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
suspensive-next-streaming-react-query Ready Ready Preview, Comment Jun 29, 2026 2:49pm
v2.suspensive.org Ready Ready Preview, Comment Jun 29, 2026 2:49pm
v3.suspensive.org Ready Ready Preview, Comment Jun 29, 2026 2:49pm
visualization.suspensive.org Ready Ready Preview, Comment Jun 29, 2026 2:49pm

Request Review

@manudeli manudeli changed the title feat: add Sentry error & Web Vitals monitoring to suspensive.org docs(suspensive.org): add Sentry error & Web Vitals monitoring to suspensive.org Jun 29, 2026
@manudeli manudeli changed the title docs(suspensive.org): add Sentry error & Web Vitals monitoring to suspensive.org docs(suspensive.org): add Sentry error monitoring to suspensive.org Jun 29, 2026
@manudeli manudeli changed the title docs(suspensive.org): add Sentry error monitoring to suspensive.org docs(suspensive.org): add Sentry error monitoring Jun 29, 2026
@manudeli
manudeli requested a review from Copilot June 29, 2026 14:49
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.22%. Comparing base (38703d1) to head (b95c245).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1977   +/-   ##
=======================================
  Coverage   93.22%   93.22%           
=======================================
  Files          42       42           
  Lines         664      664           
  Branches      164      163    -1     
=======================================
  Hits          619      619           
  Misses         42       42           
  Partials        3        3           
Components Coverage Δ
@suspensive/react 100.00% <ø> (ø)
@suspensive/react-query 95.83% <ø> (ø)
@suspensive/react-query-4 100.00% <ø> (ø)
@suspensive/react-query-5 100.00% <ø> (ø)
@suspensive/jotai 100.00% <ø> (ø)
@suspensive/codemods 81.60% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Integrates Sentry error/performance monitoring into the docs/suspensive.org Next.js (Nextra) site, adding runtime-specific Sentry initialization, a global App Router error boundary, and a tunneled ingest route to improve reliability of client-side reporting.

Changes:

  • Add @sentry/nextjs and configure Sentry source map upload + tunneling via withSentryConfig in next.config.mjs.
  • Introduce Next.js instrumentation entrypoints for server/edge/client runtimes and add a global App Router error boundary.
  • Wire Suspensive <ErrorBoundary onError> in key client components to Sentry.captureReactException and exclude /monitoring from the i18n proxy matcher.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds Sentry and related transitive dependencies to the lockfile.
docs/suspensive.org/package.json Adds @sentry/nextjs dependency for the docs site.
docs/suspensive.org/next.config.mjs Wraps Nextra config with withSentryConfig, enabling source map upload + /monitoring tunnel.
docs/suspensive.org/src/proxy.ts Excludes /monitoring from the i18n proxy matcher to avoid redirecting Sentry tunnel traffic.
docs/suspensive.org/src/instrumentation.ts Adds runtime-based registration of Sentry configs and forwards request errors.
docs/suspensive.org/src/instrumentation-client.ts Initializes client-side Sentry and hooks router transitions.
docs/suspensive.org/src/sentry.server.config.ts Initializes server-side Sentry settings for Node runtime.
docs/suspensive.org/src/sentry.edge.config.ts Initializes edge-runtime Sentry settings.
docs/suspensive.org/src/components/TrustedBy.tsx Reports Suspensive ErrorBoundary errors to Sentry.
docs/suspensive.org/src/components/BubbleChart.tsx Reports Suspensive ErrorBoundary errors to Sentry in the bubble chart.
docs/suspensive.org/src/app/global-error.tsx Adds App Router global error boundary that reports to Sentry.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +20 to +22
integrations: [
Sentry.consoleLoggingIntegration({ levels: ['log', 'warn', 'error'] }),
],
Comment on lines +10 to +11
// Attach local variable values to server stack frames for easier debugging.
includeLocalVariables: true,
Comment on lines +7 to +18
import * as Sentry from '@sentry/nextjs'
import NextError from 'next/error'
import { useEffect } from 'react'

export default function GlobalError({
error,
}: {
error: Error & { digest?: string }
}) {
useEffect(() => {
Sentry.captureException(error)
}, [error])
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 60.4 kB

ℹ️ View Unchanged
Filename Size
packages/jotai/dist/Atom.cjs 317 B
packages/jotai/dist/Atom.mjs 249 B
packages/jotai/dist/AtomValue.cjs 305 B
packages/jotai/dist/AtomValue.mjs 236 B
packages/jotai/dist/index.cjs 174 B
packages/jotai/dist/index.mjs 88 B
packages/jotai/dist/SetAtom.cjs 303 B
packages/jotai/dist/SetAtom.mjs 234 B
packages/next/dist/index.cjs 305 B
packages/next/dist/index.mjs 250 B
packages/next/dist/react-******.cjs 274 B
packages/next/dist/react-******.mjs 216 B
packages/react-query-4/dist/createGetQueryClient.cjs 1.09 kB
packages/react-query-4/dist/createGetQueryClient.mjs 1.01 kB
packages/react-query-4/dist/index.cjs 446 B
packages/react-query-4/dist/index.mjs 298 B
packages/react-query-4/dist/infiniteQueryOptions.cjs 357 B
packages/react-query-4/dist/infiniteQueryOptions.mjs 292 B
packages/react-query-4/dist/IsFetching.cjs 491 B
packages/react-query-4/dist/IsFetching.mjs 413 B
packages/react-query-4/dist/Mutation.cjs 411 B
packages/react-query-4/dist/Mutation.mjs 332 B
packages/react-query-4/dist/mutationOptions.cjs 357 B
packages/react-query-4/dist/mutationOptions.mjs 289 B
packages/react-query-4/dist/PrefetchInfiniteQuery.cjs 463 B
packages/react-query-4/dist/PrefetchInfiniteQuery.mjs 387 B
packages/react-query-4/dist/PrefetchQuery.cjs 453 B
packages/react-query-4/dist/PrefetchQuery.mjs 379 B
packages/react-query-4/dist/QueriesHydration.cjs 1.65 kB
packages/react-query-4/dist/QueriesHydration.mjs 1.56 kB
packages/react-query-4/dist/QueryClientConsumer.cjs 353 B
packages/react-query-4/dist/QueryClientConsumer.mjs 277 B
packages/react-query-4/dist/queryOptions.cjs 353 B
packages/react-query-4/dist/queryOptions.mjs 286 B
packages/react-query-4/dist/SuspenseInfiniteQuery.cjs 667 B
packages/react-query-4/dist/SuspenseInfiniteQuery.mjs 579 B
packages/react-query-4/dist/SuspenseQueries.cjs 569 B
packages/react-query-4/dist/SuspenseQueries.mjs 483 B
packages/react-query-4/dist/SuspenseQuery.cjs 654 B
packages/react-query-4/dist/SuspenseQuery.mjs 567 B
packages/react-query-4/dist/usePrefetchInfiniteQuery.cjs 462 B
packages/react-query-4/dist/usePrefetchInfiniteQuery.mjs 395 B
packages/react-query-4/dist/usePrefetchQuery.cjs 452 B
packages/react-query-4/dist/usePrefetchQuery.mjs 388 B
packages/react-query-4/dist/useSuspenseInfiniteQuery.cjs 375 B
packages/react-query-4/dist/useSuspenseInfiniteQuery.mjs 305 B
packages/react-query-4/dist/useSuspenseQueries.cjs 368 B
packages/react-query-4/dist/useSuspenseQueries.mjs 299 B
packages/react-query-4/dist/useSuspenseQuery.cjs 365 B
packages/react-query-4/dist/useSuspenseQuery.mjs 298 B
packages/react-query-5/dist/createGetQueryClient.cjs 1.09 kB
packages/react-query-5/dist/createGetQueryClient.mjs 1.01 kB
packages/react-query-5/dist/index.cjs 438 B
packages/react-query-5/dist/index.mjs 294 B
packages/react-query-5/dist/infiniteQueryOptions.cjs 352 B
packages/react-query-5/dist/infiniteQueryOptions.mjs 286 B
packages/react-query-5/dist/IsFetching.cjs 444 B
packages/react-query-5/dist/IsFetching.mjs 366 B
packages/react-query-5/dist/Mutation.cjs 411 B
packages/react-query-5/dist/Mutation.mjs 332 B
packages/react-query-5/dist/mutationOptions.cjs 350 B
packages/react-query-5/dist/mutationOptions.mjs 284 B
packages/react-query-5/dist/PrefetchInfiniteQuery.cjs 466 B
packages/react-query-5/dist/PrefetchInfiniteQuery.mjs 391 B
packages/react-query-5/dist/PrefetchQuery.cjs 459 B
packages/react-query-5/dist/PrefetchQuery.mjs 383 B
packages/react-query-5/dist/QueriesHydration.cjs 1.66 kB
packages/react-query-5/dist/QueriesHydration.mjs 1.56 kB
packages/react-query-5/dist/QueryClientConsumer.cjs 351 B
packages/react-query-5/dist/QueryClientConsumer.mjs 276 B
packages/react-query-5/dist/queryOptions.cjs 347 B
packages/react-query-5/dist/queryOptions.mjs 281 B
packages/react-query-5/dist/SuspenseInfiniteQuery.cjs 667 B
packages/react-query-5/dist/SuspenseInfiniteQuery.mjs 579 B
packages/react-query-5/dist/SuspenseQueries.cjs 585 B
packages/react-query-5/dist/SuspenseQueries.mjs 498 B
packages/react-query-5/dist/SuspenseQuery.cjs 644 B
packages/react-query-5/dist/SuspenseQuery.mjs 558 B
packages/react-query-5/dist/usePrefetchInfiniteQuery.cjs 367 B
packages/react-query-5/dist/usePrefetchInfiniteQuery.mjs 300 B
packages/react-query-5/dist/usePrefetchQuery.cjs 364 B
packages/react-query-5/dist/usePrefetchQuery.mjs 294 B
packages/react-query-5/dist/useSuspenseInfiniteQuery.cjs 368 B
packages/react-query-5/dist/useSuspenseInfiniteQuery.mjs 299 B
packages/react-query-5/dist/useSuspenseQueries.cjs 363 B
packages/react-query-5/dist/useSuspenseQueries.mjs 294 B
packages/react-query-5/dist/useSuspenseQuery.cjs 359 B
packages/react-query-5/dist/useSuspenseQuery.mjs 292 B
packages/react-query/dist/index.cjs 383 B
packages/react-query/dist/index.mjs 201 B
packages/react-query/dist/v4.cjs 383 B
packages/react-query/dist/v4.mjs 201 B
packages/react-query/dist/v5.cjs 383 B
packages/react-query/dist/v5.mjs 201 B
packages/react/dist/ClientOnly.cjs 605 B
packages/react/dist/ClientOnly.mjs 536 B
packages/react/dist/DefaultProps.cjs 968 B
packages/react/dist/DefaultProps.mjs 901 B
packages/react/dist/Delay.cjs 984 B
packages/react/dist/Delay.mjs 905 B
packages/react/dist/ErrorBoundary.cjs 2.1 kB
packages/react/dist/ErrorBoundary.mjs 2.04 kB
packages/react/dist/ErrorBoundaryGroup.cjs 1.16 kB
packages/react/dist/ErrorBoundaryGroup.mjs 1.08 kB
packages/react/dist/index.cjs 342 B
packages/react/dist/index.mjs 229 B
packages/react/dist/lazy.cjs 2.04 kB
packages/react/dist/lazy.mjs 1.98 kB
packages/react/dist/Suspense.cjs 796 B
packages/react/dist/Suspense.mjs 715 B
packages/react/dist/useIsClient.cjs 295 B
packages/react/dist/useIsClient.mjs 233 B

compressed-size-action

@manudeli
manudeli merged commit 2b9156c into main Jun 29, 2026
17 checks passed
@manudeli
manudeli deleted the feat/suspensive-org-sentry-monitoring branch June 29, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants