Skip to main content

Error Tracking

Learn how to effectively track, analyze, and resolve errors in your Meteor application.

How Error Tracking Works

SkySignal automatically captures:

  • Server errors - Exceptions in methods, publications, and server code
  • Client errors - Browser JavaScript errors (with RUM enabled)
  • Unhandled rejections - Promise rejections without catch handlers

Viewing Errors

Errors Tab

Navigate to your site's Errors tab to see:

  • Error message and type
  • Occurrence count
  • First/last seen timestamps
  • Affected users count
  • Error status (unresolved, resolved, ignored)

Error Details

Click any error to see:

  • Full stack trace
  • Recent occurrences with timestamps
  • Related method/publication
  • User context (if available)

Error Grouping

Errors are automatically grouped by:

  1. Error message (normalized)
  2. Stack trace signature
  3. Error type

This prevents duplicate noise while showing occurrence patterns.

Managing Errors

Status Workflow

New Error → Unresolved → Resolved

Ignored
  • Unresolved - Needs attention
  • Resolved - Fixed (will reopen if error recurs)
  • Ignored - Known issue, won't trigger alerts

Bulk Actions

Select multiple errors to:

  • Mark as resolved
  • Mark as ignored
  • Delete (permanently remove)

Adding Context to Errors

User Context

import SkySignal from '@skysignal/agent';

// Set user context for error attribution
Meteor.users.find().observe({
added(user) {
SkySignal.setUser({
id: user._id,
email: user.emails?.[0]?.address,
name: user.profile?.name
});
}
});

Custom Context

// Add context to errors
SkySignal.setContext({
environment: process.env.NODE_ENV,
version: process.env.APP_VERSION,
region: process.env.REGION
});

Track user actions leading to errors:

// Log breadcrumbs before errors occur
SkySignal.addBreadcrumb({
category: 'navigation',
message: 'User navigated to checkout',
level: 'info'
});

SkySignal.addBreadcrumb({
category: 'action',
message: 'User clicked purchase button',
level: 'info'
});

Manual Error Reporting

Capture Exceptions

try {
riskyOperation();
} catch (error) {
SkySignal.captureException(error, {
tags: { component: 'checkout' },
extra: { orderId: order._id }
});
}

Capture Messages

// Log warning-level messages
SkySignal.captureMessage('Payment gateway timeout', {
level: 'warning',
tags: { gateway: 'stripe' }
});

Filtering Errors

Ignore Patterns

SkySignal.init({
apiKey: 'sk_live_xxx',
errorTracking: {
ignorePatterns: [
/ResizeObserver loop/, // Browser noise
/Network request failed/, // Expected offline errors
/Loading chunk \d+ failed/ // Code splitting retries
]
}
});

Sample Rate

For high-traffic apps, sample errors:

SkySignal.init({
apiKey: 'sk_live_xxx',
errorTracking: {
sampleRate: 0.5 // Capture 50% of errors
}
});

Error Alerts

Setting Up Alerts

  1. Go to SettingsAlerts
  2. Click Add Alert
  3. Select Error Rate or New Error
  4. Configure thresholds and notifications

Alert Types

Alert TypeDescription
New ErrorTriggers when a new error type appears
Error RateTriggers when error rate exceeds threshold
Error SpikeTriggers on sudden error count increase

Source Maps

Upload source maps for readable stack traces:

# During build
npm run build

# Upload source maps
curl -X POST https://dash.skysignal.app/v1/sourcemaps \
-H "X-SkySignal-Key: sk_live_xxx" \
-F "sourcemap=@build/bundle.js.map" \
-F "url=https://yourapp.com/bundle.js" \
-F "version=1.0.0"

Best Practices

1. Triage Regularly

  • Review new errors daily
  • Resolve or ignore to keep signal clear
  • Set up alerts for critical paths

2. Add Context

  • Always set user context when available
  • Add breadcrumbs for complex flows
  • Include relevant IDs in error context

3. Use Error Boundaries

// React error boundary
class ErrorBoundary extends React.Component {
componentDidCatch(error, errorInfo) {
SkySignal.captureException(error, {
extra: { componentStack: errorInfo.componentStack }
});
}

render() {
if (this.state.hasError) {
return <ErrorFallback />;
}
return this.props.children;
}
}
  • Watch error rate over time
  • Correlate with deployments
  • Track resolution velocity

Next Steps