Skip to content

What is CrashSense?

CrashSense is an intelligent crash diagnosis SDK for JavaScript, React, and Vue applications. It goes beyond traditional error monitoring by capturing system state alongside errors — memory pressure, event loop saturation, network conditions, and framework-specific context — to tell you why your app crashed, not just what threw an exception.

The Problem

Traditional error monitoring shows you this:

TypeError: Cannot read properties of undefined (reading 'map')
    at UserList (UserList.tsx:42)
    at renderWithHooks (react-dom.development.js:14985)
    at mountIndeterminateComponent (react-dom.development.js:17811)

Now what? Is it a race condition? A failed API call? A memory leak? A hydration mismatch? You have no idea. Enjoy your next 3 hours of debugging.

The Solution

With CrashSense, the same crash gives you this:

js
{
  category: "memory_issue",
  subcategory: "memory_leak",
  confidence: 0.87,
  severity: "critical",

  contributingFactors: [
    { factor: "high_memory_utilization", weight: 0.9, evidence: "Heap at 92% (487MB / 528MB)" },
    { factor: "memory_growing_trend",   weight: 0.8, evidence: "Heap growing at 2.3MB/s over 60s" },
    { factor: "high_long_task_count",   weight: 0.6, evidence: "4 long tasks in last 30s (avg 340ms)" },
  ],

  system: {
    memory: { trend: "growing", utilizationPercent: 92.2 },
    cpu: { longTasksLast30s: 4, estimatedBlockingTime: 1360 },
    network: { failedRequestsLast60s: 0, isOnline: true },
  },

  breadcrumbs: [
    { type: "navigation", message: "User navigated to /checkout" },
    { type: "click",      message: "User clicked 'Add to Cart'" },
    { type: "network",    message: "POST /api/cart → 200 (142ms)" },
    { type: "console",    message: "Warning: memory pressure elevated" },
  ],

  // With @crashsense/ai:
  aiAnalysis: {
    rootCause: "Memory leak in useEffect — event listener not cleaned up",
    fix: { code: "return () => window.removeEventListener('resize', handler);" },
    prevention: "Always return cleanup functions from useEffect with side effects",
  }
}

Root cause identified. Fix suggested. Time saved: 3 hours.

Key Features

Crash Classification with Confidence Scoring

Every crash is classified into one of 7 categories with a confidence score (0.0–1.0) and a list of contributing factors with evidence strings.

AI-Powered Fix Suggestions

Bring your own LLM (OpenAI, Anthropic, Google, or any OpenAI-compatible endpoint). CrashSense sends a structured, token-optimized crash payload to your AI and returns a parsed root cause analysis with fix code.

Pre-Crash Warning System

3-tier escalating alerts detect dangerous system conditions before the browser tab crashes: elevated, critical, and imminent warnings based on memory pressure and iframe count.

Plugin System

Intercept, enrich, or drop crash events with custom plugins. Build backend reporters, filters, or custom enrichment logic.

Automatic capture of clicks, navigation, network requests, console output, and state changes — the full trail leading to every crash.

Privacy-First

Emails, IPs, auth tokens, and credit card numbers are auto-scrubbed at the SDK level before any data leaves the browser.

CrashSense vs. The Rest

CapabilityCrashSenseSentryLogRocketBugsnag
Root cause classification7 categories + confidenceStack trace onlyNoBasic grouping
Memory leak detectionTrends + utilizationNoNoNo
Event loop blockingLong Task monitoringNoNoNo
React crash detectionHydration, re-renders, hooksErrorBoundary onlyPartialPartial
Vue crash detectionReactivity loops, lifecyclePartialPartialPartial
Pre-crash warnings3-tier escalationNoNoNo
AI fix suggestionsBring your own LLMNoNoNo
PII auto-scrubbingSDK-levelServer-sideNoLimited
Bundle size (gzipped)~7KB~30KB~80KB~15KB
Runtime dependencies0MultipleMultipleMultiple
Open sourceMITBSLProprietaryProprietary
PricingFreeFree tier (5K events)$99/mo$59/mo

Crash Categories

CategoryWhat It DetectsHow
runtime_errorTypeError, ReferenceError, RangeError, etc.Error type analysis
memory_issueMemory leaks, heap spikes, memory pressureperformance.memory + trend analysis
event_loop_blockingInfinite loops, long tasks, frozen UILong Task API + frame timing
framework_reactHydration mismatches, infinite re-renders, hook violationsReact adapter instrumentation
framework_vueReactivity loops, lifecycle errors, watcher cascadesVue adapter instrumentation
network_inducedOffline crashes, CORS blocks, timeouts, failed requestsNetwork monitoring + error analysis
iframe_overloadExcessive iframes exhausting memoryMutationObserver + memory correlation

Packages

PackageDescriptionSize
@crashsense/coreCrash detection engine — monitors, classifiers, event bus~7KB
@crashsense/reactReact ErrorBoundary + hooks + hydration detector~1.3KB
@crashsense/vueVue plugin + composables + reactivity tracker~1.2KB
@crashsense/aiAI analysis client — any LLM endpoint~3.1KB
@crashsense/typesShared TypeScript typestypes only
@crashsense/utilsInternal utilities~2.5KB

Performance Budget

MetricBudget
CPU overhead< 2%
Memory footprint< 5MB
Core bundle (gzipped)< 15KB
SDK errorsNever crash the host app

All monitoring uses passive browser APIs (PerformanceObserver, MutationObserver). Zero monkey-patching by default.

Browser Support

BrowserVersion
Chrome80+
Firefox80+
Safari14+
Edge80+
Node.js18+

TIP

performance.memory is Chrome-only. Memory monitoring gracefully degrades in other browsers. All other features work cross-browser.

Released under the MIT License.