SE

sentry-migration-deep-dive

Plan and execute the migration from legacy error tracking tools to the Sentry platform.

Install

mkdir -p .claude/skills/sentry-migration-deep-dive && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9026" && unzip -o skill.zip -d .claude/skills/sentry-migration-deep-dive && rm skill.zip

Installs to .claude/skills/sentry-migration-deep-dive

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Migrate to Sentry from other error tracking tools like Rollbar, Bugsnag,
72 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Map legacy error tracker concepts to Sentry
  • Install Sentry SDK in parallel with existing tools
  • Migrate alert rules from legacy providers to Sentry
  • Validate parity between error trackers using API stats
  • Configure Sentry error handler middleware for Express
  • Implement React error boundaries with Sentry

How it works

This skill facilitates a phased transition by running Sentry alongside existing tools to validate data parity before decommissioning the legacy provider.

Inputs & outputs

You give it
Legacy error tracker configuration and API keys
You get back
Sentry project with parity-validated error reporting

When to use sentry-migration-deep-dive

  • Map legacy alerts to Sentry rules
  • Perform phased transition between error trackers
  • Inventory existing alert integrations
  • Validate Sentry SDK setup during migration

About this skill

Sentry Migration Deep Dive

Overview

Replace an existing error tracking tool (Rollbar, Bugsnag, New Relic, Raygun, Airbrake) with Sentry using a phased migration that runs both tools in parallel before cutover. This skill covers concept mapping between providers, SDK swap patterns, alert rule migration, team training, and rollback strategy.

Current State

!npm list 2>/dev/null | command grep -iE "sentry|rollbar|bugsnag|raygun|airbrake|honeybadger|newrelic" || echo 'No error tracking packages found'

Prerequisites

  • Admin access to the current error tracking tool (API keys, alert rule access)
  • Sentry project created with DSN available in environment variables
  • Source maps or debug symbols configured for stack trace resolution
  • Parallel run timeline agreed with team (2-4 weeks recommended)
  • Inventory of current alert rules, integrations, and custom filters

Instructions

Step 1: Map Concepts Between Providers

Build a translation table mapping the current tool's terminology and API surface to Sentry equivalents. Scan the codebase for all calls to the existing SDK.

ConceptRollbarBugsnagNew RelicSentry
Capture errorrollbar.error(err)Bugsnag.notify(err)newrelic.noticeError(err)Sentry.captureException(err)
Log messagerollbar.info(msg)Bugsnag.notify(msg)newrelic.recordCustomEvent()Sentry.captureMessage(msg)
User contextrollbar.configure({ person: {...} })Bugsnag.setUser(id, email)newrelic.setUserID(id)Sentry.setUser({ id, email })
Tags/metadatarollbar.configure({ custom: {...} })bugsnag.addMetadata(tab, data)newrelic.addCustomAttributes()Sentry.setTag() / Sentry.setContext()
Breadcrumbsrollbar.log(level, msg)Bugsnag.leaveBreadcrumb(msg)N/ASentry.addBreadcrumb({ message })
Release trackingcode_version configappVersion configNEW_RELIC_LABELSSentry.init({ release: 'v1.2.3' })
Environmentenvironment configreleaseStage configNEW_RELIC_APP_NAME suffixSentry.init({ environment: 'prod' })
Error filtercheckIgnore callbackonError callbackignore_errors configbeforeSend hook
PerformanceN/A@bugsnag/plugin-*Built-in APMBuilt-in tracesSampleRate

Use Grep to find all references: grep -rn "rollbar\|Bugsnag\|newrelic\|noticeError" --include="*.ts" --include="*.js" src/

Step 2: Install Sentry in Parallel

Install the Sentry SDK alongside the existing tool. Route errors to both destinations during the transition period to validate parity before removing the old tool.

// instrument.ts -- load BEFORE any other import
import * as Sentry from '@sentry/node';

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.NODE_ENV,
  release: process.env.npm_package_version,  // auto-read from package.json
  tracesSampleRate: 0.1,                     // start low, tune after baseline
  sendDefaultPii: false,
});
// dual-reporter.ts -- send to BOTH tools during parallel run
import * as Sentry from '@sentry/node';

// Keep existing tool import (e.g., Rollbar, Bugsnag)
import Rollbar from 'rollbar';
const rollbar = new Rollbar({ accessToken: process.env.ROLLBAR_TOKEN });

export function captureError(error: Error, context?: Record<string, unknown>) {
  // Sentry (new)
  Sentry.withScope((scope) => {
    if (context) scope.setContext('migration', context);
    Sentry.captureException(error);
  });

  // Old tool (keep running until parity verified)
  rollbar.error(error, context);
}

export function setUserContext(user: { id: string; email?: string }) {
  Sentry.setUser(user);
  rollbar.configure({ payload: { person: { id: user.id, email: user.email } } });
}

Step 3: Migrate Alert Rules, Validate Parity, and Cut Over

  1. Export alert rules from the old tool. Map each alert to a Sentry equivalent:

    • "New error in production" becomes a Sentry Issue Alert with filter environment:production and action "Send Slack notification".
    • "Error rate > 100/min" becomes a Sentry Metric Alert with threshold 100 events per minute and PagerDuty action.
    • Rate-based alerts use Sentry Metric Alerts; occurrence-based alerts use Sentry Issue Alerts.
  2. Validate parity during the parallel run window:

    # Compare error counts -- Sentry API
    curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
      "https://sentry.io/api/0/projects/$SENTRY_ORG/$SENTRY_PROJECT/stats/" | jq '.[] | .total'
    
    # Compare with old tool API (Rollbar example)
    curl -s -H "X-Rollbar-Access-Token: $ROLLBAR_TOKEN" \
      "https://api.rollbar.com/api/1/reports/top_recent_items" | jq '.result | length'
    
    • Error count should be within 10% between tools.
    • Stack traces must resolve correctly (verify source maps uploaded to Sentry).
    • Breadcrumbs, user context, and tags must appear in Sentry event detail.
  3. Remove the old SDK after parity is confirmed:

    npm uninstall rollbar @bugsnag/node @bugsnag/plugin-express newrelic || echo "Some packages not found (expected if only one tool was installed)"
    

    Search for leftover references and remove them:

    grep -rn "rollbar\|bugsnag\|newrelic\|raygun\|airbrake" \
      --include="*.ts" --include="*.js" --include="*.env*" \
      --exclude-dir=node_modules . || echo "No remaining references found"
    
  4. Schedule team training: walk through the Sentry dashboard (Issues, Performance, Releases views), show how to assign issues, and demonstrate the alert configuration UI.

  5. Rollback strategy: keep the old tool's npm package in devDependencies and its configuration file in a migration-backup/ directory for 30 days after cutover. If Sentry surfaces fewer errors than expected, re-enable dual reporting and investigate.

Output

  • Concept mapping table translating old API calls to Sentry equivalents
  • Dual-reporting wrapper sending errors to both tools during parallel run
  • Sentry SDK initialized with environment, release, and sampling configuration
  • Alert rules migrated from old tool to Sentry Issue and Metric Alerts
  • Parity validation confirming error count, stack traces, and context match
  • Old SDK removed and all references cleaned from codebase

Error Handling

ErrorCauseSolution
Error count mismatch between toolsDifferent sampling rates or filter rulesSet both tools to 100% sampling during parallel run; disable beforeSend filters temporarily
Missing stack traces in SentrySource maps not uploadedRun sentry-cli sourcemaps upload --release=$(npm pkg get version) in CI
Old tool references remain after removalIncomplete codebase searchRun grep across all file types including .env, CI configs, and infrastructure-as-code
Sentry alerts not firingAlert conditions misconfiguredTest with a synthetic error: Sentry.captureException(new Error('alert-test')) and verify delivery
New Relic APM data missing after switchSentry replaces error tracking only, not full APMKeep New Relic for APM if needed; Sentry Performance covers traces but not infrastructure metrics
Team unfamiliar with Sentry UINo training providedSchedule 30-minute walkthrough covering Issues, Performance, and Releases views

Examples

Migrate Express app from Rollbar to Sentry:

// BEFORE: rollbar error handler middleware
import Rollbar from 'rollbar';
const rollbar = new Rollbar({ accessToken: process.env.ROLLBAR_TOKEN });
app.use(rollbar.errorHandler());

// AFTER: Sentry error handler middleware
import * as Sentry from '@sentry/node';
Sentry.init({ dsn: process.env.SENTRY_DSN });
Sentry.setupExpressErrorHandler(app);

Migrate React error boundary from Bugsnag to Sentry:

// BEFORE: Bugsnag React initialization + error boundary
import Bugsnag from '@bugsnag/js';
import BugsnagPluginReact from '@bugsnag/plugin-react';
Bugsnag.start({ plugins: [new BugsnagPluginReact()] });
const ErrorBoundary = Bugsnag.getPlugin('react')!.createErrorBoundary(React);
// Usage: wrap root component with ErrorBoundary

// AFTER: Sentry React initialization + error boundary
import * as Sentry from '@sentry/react';
Sentry.init({ dsn: process.env.SENTRY_DSN });
// Usage: wrap root component with Sentry.ErrorBoundary (accepts fallback prop)
// See @sentry/react docs for ErrorBoundary component API

Post-migration verification script:

import * as Sentry from '@sentry/node';

async function verifyMigration() {
  const eventId = Sentry.captureException(new Error('Migration verification test'));
  console.log('Error captured:', eventId ? 'PASS' : 'FAIL');

  Sentry.captureMessage('Migration complete', 'info');

  const flushed = await Sentry.flush(5000);
  console.log('Events delivered:', flushed ? 'PASS' : 'FAIL');
}

verifyMigration();

Resources

Next Steps

After migration, proceed to sentry-performance-tracing to configure distributed tracing, or sentry-prod-checklist to verify production readiness.

When not to use it

  • When the project lacks source maps or debug symbols
  • When the team cannot commit to a parallel run timeline

Prerequisites

Admin access to current error tracking toolSentry project with DSNSource maps or debug symbols configuredParallel run timeline of 2-4 weeks

Limitations

  • Requires manual mapping of legacy alert rules to Sentry equivalents
  • Parallel run window is recommended to be 2-4 weeks

How it compares

Unlike manual migration, this approach uses a translation table and parallel instrumentation to ensure no error data is lost during the switch.

Compared to similar skills

sentry-migration-deep-dive side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
sentry-migration-deep-dive (this skill)027dCautionIntermediate
godot1,0445moReviewIntermediate
python-testing-patterns772moReviewIntermediate
error-handling-patterns352moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,0441,947

python-testing-patterns

wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

77204

error-handling-patterns

wshobson

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

35170

chrome-devtools

mrgoonie

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

41157

unreal-engine-cpp-pro

sickn33

Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.

43117

python-performance-optimization

wshobson

Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.

27131

Search skills

Search the agent skills registry