{"name":"sentry-sdk-setup","url":"https://skills.sh/getsentry/sentry-for-ai/sentry-sdk-setup","install":"npx skills add getsentry/sentry-for-ai --skill sentry-sdk-setup","sdk":"sentry","key":"sentry/sentry-sdk-setup","description":"Set up Sentry in any language or framework. Detects the user's platform and loads the right SDK skill. Use when asked to add Sentry, install an SDK, or set up error monitoring in a project.","hasContent":true,"content":"---\nname: sentry-sdk-setup\ndescription: Set up Sentry in any language or framework. Detects the user's platform and loads the right SDK skill. Use when asked to add Sentry, install an SDK, or set up error monitoring in a project.\nlicense: Apache-2.0\nrole: router\n---\n\n> [All Skills](../../SKILL_TREE.md)\n\n# Sentry SDK Setup\n\nSet up Sentry error monitoring, tracing, and session replay in any language or framework. This page helps you find the right SDK skill for your project.\n\n## Start Here — Read This Before Doing Anything\n\n**Do not skip this section.** Do not assume which SDK the user needs based on their project files. Do not start installing packages or creating config files until you have confirmed the user's intent.\n\n1. **Detect the platform** from project files (`package.json`, `go.mod`, `requirements.txt`, `Gemfile`, `*.csproj`, `build.gradle`, etc.).\n2. **Tell the user what you found** and which SDK you recommend.\n3. **Wait for confirmation** before reading the skill and proceeding.\n\nEach SDK skill contains its own detection logic, prerequisites, and step-by-step configuration. Trust the skill — read it carefully and follow it. Do not improvise or take shortcuts.\n\n---\n\n## SDK Skills\n\n| Platform | Skill |\n|---|---|\n| Android | [`sentry-android-sdk`](../sentry-android-sdk/SKILL.md) |\n| browser JavaScript | [`sentry-browser-sdk`](../sentry-browser-sdk/SKILL.md) |\n| Cloudflare Workers and Pages | [`sentry-cloudflare-sdk`](../sentry-cloudflare-sdk/SKILL.md) |\n| Apple platforms (iOS, macOS, tvOS, watchOS, visionOS) | [`sentry-cocoa-sdk`](../sentry-cocoa-sdk/SKILL.md) |\n| .NET | [`sentry-dotnet-sdk`](../sentry-dotnet-sdk/SKILL.md) |\n| Elixir | [`sentry-elixir-sdk`](../sentry-elixir-sdk/SKILL.md) |\n| Go | [`sentry-go-sdk`](../sentry-go-sdk/SKILL.md) |\n| NestJS | [`sentry-nestjs-sdk`](../sentry-nestjs-sdk/SKILL.md) |\n| Next.js | [`sentry-nextjs-sdk`](../sentry-nextjs-sdk/SKILL.md) |\n| Node.js, Bun, and Deno | [`sentry-node-sdk`](../sentry-node-sdk/SKILL.md) |\n| PHP | [`sentry-php-sdk`](../sentry-php-sdk/SKILL.md) |\n| Python | [`sentry-python-sdk`](../sentry-python-sdk/SKILL.md) |\n| Flutter and Dart | [`sentry-flutter-sdk`](../sentry-flutter-sdk/SKILL.md) |\n| React Native and Expo | [`sentry-react-native-sdk`](../sentry-react-native-sdk/SKILL.md) |\n| React | [`sentry-react-sdk`](../sentry-react-sdk/SKILL.md) |\n| React Router Framework | [`sentry-react-router-framework-sdk`](../sentry-react-router-framework-sdk/SKILL.md) |\n| TanStack Start React | [`sentry-tanstack-start-sdk`](../sentry-tanstack-start-sdk/SKILL.md) |\n| Ruby | [`sentry-ruby-sdk`](../sentry-ruby-sdk/SKILL.md) |\n| Svelte and SvelteKit | [`sentry-svelte-sdk`](../sentry-svelte-sdk/SKILL.md) |\n\n### Platform Detection Priority\n\nWhen multiple SDKs could match, prefer the more specific one:\n\n- **Android** (`build.gradle` with android plugin) → `sentry-android-sdk`\n- **Cloudflare** (`wrangler.toml` or `wrangler.jsonc`) → `sentry-cloudflare-sdk` over `sentry-node-sdk`\n- **NestJS** (`@nestjs/core`) → `sentry-nestjs-sdk` over `sentry-node-sdk`\n- **Next.js** → `sentry-nextjs-sdk` over `sentry-react-sdk` or `sentry-node-sdk`\n- **React Router Framework** (`@sentry/react-router` or `@react-router/*`) → `sentry-react-router-framework-sdk` over `sentry-react-sdk`\n- **TanStack Start React** (`@tanstack/react-start`) → `sentry-tanstack-start-sdk` over `sentry-react-sdk`\n- **Flutter** (`pubspec.yaml` with `flutter:` dependency or `sentry_flutter`) → `sentry-flutter-sdk`\n- **React Native** → `sentry-react-native-sdk` over `sentry-react-sdk`\n- **PHP** with Laravel or Symfony → `sentry-php-sdk`\n- **Elixir** (`mix.exs` detected) → `sentry-elixir-sdk`\n- **Node.js / Bun / Deno** without a specific framework → `sentry-node-sdk`\n- **Browser JS** (vanilla, jQuery, static sites) → `sentry-browser-sdk`\n- **No match** → direct user to [Sentry Docs](https://docs.sentry.io/platforms/)\n\n## Quick Lookup\n\nMatch your project to a skill by keywords.\n\n| Keywords | Skill |\n|---|---|\n| android, kotlin, java, jetpack compose | [`sentry-android-sdk`](../sentry-android-sdk/SKILL.md) |\n| browser, vanilla js, javascript, jquery, cdn, wordpress, static site | [`sentry-browser-sdk`](../sentry-browser-sdk/SKILL.md) |\n| cloudflare, cloudflare workers, cloudflare pages, wrangler, durable objects, d1 | [`sentry-cloudflare-sdk`](../sentry-cloudflare-sdk/SKILL.md) |\n| ios, macos, swift, cocoa, tvos, watchos, visionos, swiftui, uikit | [`sentry-cocoa-sdk`](../sentry-cocoa-sdk/SKILL.md) |\n| .net, csharp, c#, asp.net, maui, wpf, winforms, blazor, azure functions | [`sentry-dotnet-sdk`](../sentry-dotnet-sdk/SKILL.md) |\n| go, golang, gin, echo, fiber | [`sentry-go-sdk`](../sentry-go-sdk/SKILL.md) |\n| elixir, phoenix, plug, oban | [`sentry-elixir-sdk`](../sentry-elixir-sdk/SKILL.md) |\n| nestjs, nest | [`sentry-nestjs-sdk`](../sentry-nestjs-sdk/SKILL.md) |\n| nextjs, next.js, next | [`sentry-nextjs-sdk`](../sentry-nextjs-sdk/SKILL.md) |\n| node, nodejs, node.js, bun, deno, express, fastify, koa, hapi | [`sentry-node-sdk`](../sentry-node-sdk/SKILL.md) |\n| php, laravel, symfony | [`sentry-php-sdk`](../sentry-php-sdk/SKILL.md) |\n| python, django, flask, fastapi, celery, starlette | [`sentry-python-sdk`](../sentry-python-sdk/SKILL.md) |\n| flutter, dart, pubspec | [`sentry-flutter-sdk`](../sentry-flutter-sdk/SKILL.md) |\n| react native, expo | [`sentry-react-native-sdk`](../sentry-react-native-sdk/SKILL.md) |\n| react, react router, tanstack, redux, vite | [`sentry-react-sdk`](../sentry-react-sdk/SKILL.md) |\n| react-router framework, @sentry/react-router, @react-router/dev, react-router reveal | [`sentry-react-router-framework-sdk`](../sentry-react-router-framework-sdk/SKILL.md) |\n| tanstack start, tanstack react start, @tanstack/react-start, tanstackstart-react | [`sentry-tanstack-start-sdk`](../sentry-tanstack-start-sdk/SKILL.md) |\n| ruby, rails, sinatra, sidekiq, rack | [`sentry-ruby-sdk`](../sentry-ruby-sdk/SKILL.md) |\n| svelte, sveltekit | [`sentry-svelte-sdk`](../sentry-svelte-sdk/SKILL.md) |\n\n---\n\n## Finding the DSN\n\nIf the user doesn't have their DSN, guide them to find it:\n\n1. Open the Sentry project settings page: `https://sentry.io/settings/projects/`\n2. Select the project\n3. Click **\"Client Keys (DSN)\"** in the left sidebar\n4. Copy the DSN\n\nYou can help the user open the page directly:\n```bash\nopen https://sentry.io/settings/projects/        # macOS\nxdg-open https://sentry.io/settings/projects/    # Linux\nstart https://sentry.io/settings/projects/        # Windows\n```\n\n> **Note:** The DSN is public and safe to include in source code. It is not a secret — it only identifies where to send events.\n\n---\n\nLooking for workflows or feature configuration instead? See the [full Skill Tree](../../SKILL_TREE.md).\n","contentSource":"skills.sh/api/download/getsentry/sentry-for-ai/sentry-sdk-setup","contentFetchedAt":"2026-07-27T08:59:26.295Z"}