Stale Detection: - Detect skills removed/moved from GitHub (3 consecutive 404s threshold) - Hide stale skills from browse/search, show warning banner on detail page - Serve cached files with isStale flag when GitHub returns 404 - Add stale-check crawler command for batch verification - CLI shows warning when installing stale skills from cache Sentry & Error Handling: - Filter browser extension errors and add denyUrls - Anti-inflation measures and sentinel recalibration for curation Claim & Removal: - Enhanced ClaimForm with repo-level removal support - Add repo-removal-request API endpoint with tests - Improved owner page with bilingual content Review Pipeline: - Review version and reviewer tracking in submit API - Source format filter for pending reviews - Updated review tests Other: - Updated i18n strings (en/fa) - BrowseFilters improvements - Dockerfile updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
83 lines
2.6 KiB
TypeScript
83 lines
2.6 KiB
TypeScript
// This file configures the initialization of Sentry on the client.
|
|
// The config you add here will be used whenever a users loads a page in their browser.
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
|
|
import * as Sentry from "@sentry/nextjs";
|
|
|
|
Sentry.init({
|
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
|
|
// Environment and release tracking
|
|
environment: process.env.NODE_ENV,
|
|
release: process.env.NEXT_PUBLIC_SENTRY_RELEASE,
|
|
|
|
// Enable structured logging
|
|
enableLogs: true,
|
|
|
|
// Console logging integration - capture warnings and errors
|
|
integrations: [
|
|
Sentry.consoleLoggingIntegration({
|
|
levels: ["warn", "error"],
|
|
}),
|
|
],
|
|
|
|
// Performance Monitoring
|
|
// Capture 10% of transactions in production, 100% in development
|
|
tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,
|
|
|
|
// Session Replay for debugging user issues
|
|
replaysSessionSampleRate: 0.1, // 10% of sessions
|
|
replaysOnErrorSampleRate: 1.0, // 100% of sessions with errors
|
|
|
|
// Filter out common non-actionable errors
|
|
ignoreErrors: [
|
|
// AbortError during navigation — Next.js RSC prefetch/streaming cancelled mid-flight
|
|
"AbortError",
|
|
// Network stream errors (Firefox)
|
|
"Error in input stream",
|
|
// Network fetch failures (Safari / mobile)
|
|
"Load failed",
|
|
// Generic network errors (client connectivity issues)
|
|
"network error",
|
|
// Browser extension noise (translation/accessibility extensions)
|
|
/Object Not Found Matching Id/,
|
|
// ResizeObserver loop limit — browser quirk, not actionable
|
|
"ResizeObserver",
|
|
// DOM manipulation by browser extensions (translate, font, etc.) conflicts with React
|
|
"NotFoundError: Failed to execute 'removeChild' on 'Node'",
|
|
"NotFoundError: Failed to execute 'insertBefore' on 'Node'",
|
|
// Browser extension internal errors (crypto wallets, etc.)
|
|
/func .* not found/,
|
|
],
|
|
|
|
// Ignore errors originating from browser extensions or injected scripts
|
|
denyUrls: [
|
|
/extensions\//i,
|
|
/^chrome:\/\//i,
|
|
/^chrome-extension:\/\//i,
|
|
/^moz-extension:\/\//i,
|
|
/inpage\.js/,
|
|
],
|
|
|
|
beforeSend(event, hint) {
|
|
// Log to console in development for debugging
|
|
if (process.env.NODE_ENV === "development") {
|
|
console.error("[Sentry]", hint.originalException || hint.syntheticException);
|
|
}
|
|
|
|
return event;
|
|
},
|
|
|
|
// Filter out noisy breadcrumbs
|
|
beforeBreadcrumb(breadcrumb) {
|
|
// Ignore fetch requests to analytics endpoints
|
|
if (
|
|
breadcrumb.category === "fetch" &&
|
|
breadcrumb.data?.url?.includes("analytics")
|
|
) {
|
|
return null;
|
|
}
|
|
return breadcrumb;
|
|
},
|
|
});
|