How Cazon Captures Errors (SDK + Sentry)

December 28, 2025Chris Quinn

Summary

Cazon doesn't force you to replace your existing error monitoring. Install the Node.js SDK for automatic capture in production, or connect your Sentry account via webhook to enrich errors you're already collecting. Either way, errors flow into Cazon for analysis, pattern matching, and impact scoring, then get exposed to your AI tools.


Error Intelligence starts with error capture, but we're not here to replace your monitoring stack. If you're already using Sentry, New Relic, or another monitoring tool, keep using it. Cazon integrates with what you have, enriching the errors you're already collecting rather than forcing you to rip out working infrastructure.

We provide two capture methods: a lightweight Node.js SDK for direct integration, and a Sentry webhook integration for teams already invested in Sentry's ecosystem. Let's look at both.

Method 1: The Node.js SDK

The Cazon SDK is a small JavaScript library (~15KB) that captures production errors and sends them to Cazon for enrichment. It works in two modes: automatic capture (install and forget) or manual capture (full control).

Automatic Mode captures uncaught exceptions, unhandled promise rejections, and critical errors without any code changes beyond initialization. Install the package, add two lines to your server startup, and errors start flowing to Cazon. This is perfect for teams that want intelligence on top of their existing error handling without refactoring.

const cazon = require('@cazon/node');
cazon.init({ apiKey: 'your-api-key' });

// Your app continues as normal
app.listen(3000);

Manual Mode gives you precise control over what gets captured. You wrap error-prone code blocks, manually report specific errors, and attach custom metadata (user IDs, request context, business logic state). This is ideal for teams that want to capture errors selectively or add domain-specific context.

try {
  await processPayment(order);
} catch (error) {
  cazon.captureException(error, {
    userId: order.userId,
    orderTotal: order.total,
    paymentMethod: order.paymentMethod,
  });
  throw error;
}

Both modes support error fingerprinting (we'll cover this in a moment), user context enrichment, and environment tagging (production vs staging). The SDK is open source, lightweight, and designed to have near-zero performance impact on your application.

Method 2: Sentry Integration

If you're already using Sentry, you don't need to install our SDK at all. Instead, configure a Sentry webhook to send error events to Cazon as they occur. We enrich the errors Sentry has already captured, adding impact scores, pattern matching, and trend analysis on top of Sentry's data.

Here's how it works:

  1. In your Sentry project settings, add a webhook pointing to https://api.cazon.dev/integrations/sentry
  2. Authenticate with your Cazon API key (passed as a header)
  3. Sentry sends error events to Cazon in real time
  4. Cazon enriches the errors and makes them available through our API and extensions

The beauty of this approach is that Sentry remains your source of truth for error capture, while Cazon adds the intelligence layer. You keep Sentry's dashboards, alerting, and historical data; you gain Cazon's impact scoring, AI integration, and pattern matching. We're complementary, not competitive.

Why would you want both Sentry and Cazon? Because Sentry is excellent at capturing and displaying errors but doesn't provide structured intelligence for AI tools. Cazon fills that gap, turning Sentry's raw error stream into prioritized, contextualized data that your AI coding assistant can consume.

Why We're Complementary to Sentry

This is important to understand: Cazon is not trying to replace Sentry. Sentry is a mature, battle-tested monitoring platform with features we have no interest in duplicating (performance monitoring, session replay, release tracking). Our goal is to sit downstream of Sentry, adding an intelligence layer that Sentry wasn't designed to provide.

Think of it like feature flags. LaunchDarkly doesn't replace your analytics tool; it adds a control layer on top of it. Similarly, Cazon doesn't replace your monitoring tool; it adds an intelligence layer on top of it. You get the best of both worlds: Sentry's robust capture and dashboards, plus Cazon's AI-ready intelligence and developer tool integrations.

For teams not using Sentry, our SDK provides a lightweight capture mechanism that's enough to get started. For teams already invested in Sentry, the webhook integration lets you add Cazon without changing a single line of application code.

Error Fingerprinting and Deduplication

One of the first things Cazon does when receiving an error is fingerprint it. An error fingerprint is a unique identifier based on the stack trace, error message, and error type. Two errors with the same fingerprint are considered instances of the same underlying problem, even if they occur at different times or affect different users.

Why does this matter? Because production errors are noisy. The same TypeError might occur 500 times in an hour, but it's really just one bug affecting 500 requests. Without fingerprinting, you'd see 500 individual errors and waste time investigating the same root cause repeatedly. With fingerprinting, you see one error with 500 occurrences, making triage dramatically simpler.

Here's what goes into a fingerprint:

  • Error type (TypeError, ReferenceError, custom error classes)
  • Error message (stripped of dynamic values like IDs or timestamps)
  • Stack trace (normalized to ignore line number variations)
  • Code location (file path and function name)

We also deduplicate aggressively. If the same error occurs 1,000 times in 10 minutes, we store it once and track the occurrence count, affected user count, and time distribution. This reduces storage costs, speeds up queries, and makes trend analysis meaningful (you can see that an error went from 10/hour to 100/hour, which matters for prioritization).

VS Code Extension Captures Development Errors

Beyond production capture, the Cazon VS Code extension also captures terminal errors during local development. When you run npm start or node server.js and an error occurs, the extension intercepts it, fingerprints it, and checks if it matches a known pattern from production.

This creates a powerful feedback loop: production errors get captured and fingerprinted, developers encounter similar errors locally, and the extension can say "this looks like error #4732 from production, here's what worked last time." It connects local development to production intelligence without requiring developers to manually search error logs or Slack history.

Development error capture is optional and privacy-conscious. We only capture stack traces and error messages, not source code or environment variables. You can disable it entirely if your team prefers to keep development errors local.

The Capture → Enrich → Expose Pipeline

Once an error is captured (via SDK or Sentry webhook), it enters Cazon's processing pipeline:

Step 1: Capture - Error arrives with basic metadata (stack trace, message, timestamp, user context).

Step 2: Fingerprint - We generate a unique ID and check if this error has been seen before.

Step 3: Pattern Match - We compare the fingerprint against historical errors to identify known patterns (more on this in Post 5).

Step 4: Impact Score - We calculate how many users are affected, how frequently it's occurring, and whether it's trending up or down (more on this in Post 6).

Step 5: Enrich - We attach team context, previous investigation notes, and related errors.

Step 6: Expose - The enriched error becomes available through our API, VS Code extension, and MCP server for AI assistants to query.

This pipeline runs in real time (typically under 100ms from capture to availability), ensuring that developers and AI tools always have fresh intelligence about production errors.

What This Means for Your Workflow

With error capture in place, you stop worrying about "how do I get errors into Cazon?" and start focusing on "what do I do with the intelligence Cazon provides?" The capture layer is invisible; it just works. Errors flow in from production, get enriched automatically, and appear in your AI coding assistant or VS Code extension with full context.

No more copying stack traces from Sentry and pasting them into Claude. No more manually correlating error IDs with user accounts. No more guessing which error affects the most users. The capture layer handles the boring work, and the intelligence layer gives you the insights you need to debug faster.

What's Next

Error capture is the foundation, but the magic happens in the enrichment layer. Once errors are flowing into Cazon, we start pattern matching them against historical errors to identify known problems with known solutions.

Next, we'll show you how pattern matching works, how we built a library of 100+ error signatures, and how your team can add custom patterns for domain-specific errors.


This is Post 4 of our launch series on error intelligence. Follow along as we unpack the problem, introduce solutions, and show you how Cazon is building the missing intelligence layer between production errors and AI coding assistants.

Next: Post 5 - Pattern Matching: 100+ Error Signatures →

Ready to try Cazon?

Give your AI coding assistant production error intelligence

Get Started Free