CommunityCodierung & Entwicklunggithub.com

getsentry/sentry-otel-exporter-setup

Konfigurieren Sie den OpenTelemetry Collector mit dem Sentry Exporter für Multi-Projekt-Routing und automatische Projekterstellung. Verwenden Sie dies beim Einrichten von OTel mit Sentry, beim Konfigurieren von Collector-Pipelines für Traces und Logs oder beim Routen von Telemetriedaten mehrerer Dienste zu Sentry-Projekten.

Was ist sentry-otel-exporter-setup?

Dieses Skill konfiguriert den OpenTelemetry Collector mit dem Sentry Exporter, um Telemetriedaten (Traces und Logs) von mehreren Diensten an verschiedene Sentry-Projekte weiterzuleiten. Es automatisiert die Projektzuordnung basierend auf Namespace-Präfixen, erstellt bei Bedarf neue Projekte in Sentry und verwaltet Schlüssel und DSNs. Das Skill ist besonders nützlich für Entwickler, die eine zentrale Observability-Plattform mit OpenTelemetry aufbauen und die gesammelten Daten nahtlos in Sentry integrieren möchten. Es unterstützt die Konfiguration von Pipelines für Traces und Logs und bietet eine flexible Konfiguration über YAML- oder HCL-Dateien. Durch die automatische Projekterstellung entfällt manueller Aufwand und es wird sichergestellt, dass jedes Service seine eigene Sentry-Umgebung hat.

Funktioniert mit~Claude Code~Codex CLI~Cursor
Part ofMobile
npx skills add https://github.com/getsentry/sentry-for-ai/tree/main/skills/sentry-otel-exporter-setup

Installed? Explore more Codierung & Entwicklung skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht sentry-otel-exporter-setup?

Konfigurieren Sie den OpenTelemetry Collector mit dem Sentry Exporter für Multi-Projekt-Routing und automatische Projekterstellung. Verwenden Sie dies beim Einrichten von OTel mit Sentry, beim Konfigurieren von Collector-Pipelines für Traces und Logs oder beim Routen von Telemetriedaten mehrerer Dienste zu Sentry-Projekten.

Übersicht

Dieses Skill erstellt Konfigurationsdateien für den OpenTelemetry Collector, die es ermöglichen, Telemetriedaten basierend auf dem Dienstnamen an verschiedene Sentry-Projekte weiterzuleiten. Es unterstützt die automatische Projekterstellung in Sentry für neue Dienste und die Verwaltung von Projekt-APIs und DSNs.

Voraussetzungen

  • Ein Sentry-Konto mit Administratorzugriff
  • Ein Sentry-Auth-Token mit der Berechtigung project:write
  • OpenTelemetry Collector, der läuft oder bereit zur Konfiguration ist

Verwendung

1. Konfigurationsdatei erstellen

Erstellen Sie eine YAML-Datei (z. B. collector-config.yaml):

receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:
  sentry:
    dsn: https://[email protected]/123456
    environment: production
    traces_sample_rate: 1.0

processors:
  batch:

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [sentry]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [sentry]

2. Projekte automatisch erstellen

Das Skill kann automatisch Sentry-Projekte für jeden neuen Dienstnamen erstellen. Setzen Sie dazu die Umgebungsvariable SENTRY_AUTH_TOKEN und konfigurieren Sie die Projektzuordnung:

exporters:
  sentry:
    dsn: https://[email protected]/123456
    # Mapping von Dienstname zu Sentry-Projekt
    projects:
      service-a: project-a
      service-b: project-b
    # Automatische Projekterstellung aktivieren
    auto_create_project: true

3. Multi-Projekt-Routing

Um Telemetriedaten verschiedener Dienste an unterschiedliche Sentry-Projekte weiterzuleiten, konfigurieren Sie die Routing-Regeln:

exporters:
  sentry:
    dsn: https://[email protected]/123456
    routing:
      rules:
        - service: service-*
          project: project-{namespace}

Konfigurationsoptionen

OptionBeschreibungStandard
dsnSentry DSN für die VerbindungErforderlich
environmentUmgebung (z. B. production, staging)""
traces_sample_rateSampling-Rate für Traces (0.0 - 1.0)1.0
projectsMapping von Dienstname zu Sentry-Projekt{}
auto_create_projectNeue Projekte automatisch erstellenfalse
routingRouting-Regeln für Multi-Projekt[]

Beispiel mit HCL

Das Skill unterstützt auch HCL-Konfiguration:

exporter "sentry" "default" {
  dsn = "https://[email protected]/123456"
  environment = "production"
  traces_sample_rate = 0.5
}

Fehlerbehandlung

  • Wenn ein Auth-Token fehlt, wird beim Erstellen eines neuen Projekts ein Fehler angezeigt.
  • Wenn ein DSN ungültig ist, werden keine Daten gesendet.
  • Routing-Regeln, die nicht zu einem existierenden Projekt führen, werden ignoriert.

Limitierungen

  • Automatische Projekterstellung funktioniert nur, wenn ein gültiges Auth-Token gesetzt ist.
  • Jeder OpenTelemetry Collector kann nur eine einzige Konfiguration für den Sentry Exporter haben.
  • Das Skill unterstützt keine Kubernetes-spezifischen Konfigurationen.

Weitere Informationen

Lizenz

MIT

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

getsentry/sentry-android-sdk

Full Sentry SDK setup for Android. Use when asked to "add Sentry to Android", "install sentry-android", "setup Sentry in Android", or configure error monitoring, tracing, profiling, session replay, or logging for Android applications. Supports Kotlin and Java codebases.

getsentry/sentry-browser-sdk

Full Sentry SDK setup for browser JavaScript. Use when asked to "add Sentry to a website", "install @sentry/browser", or configure error monitoring, tracing, session replay, or logging for vanilla JavaScript, jQuery, static sites, or WordPress.

getsentry/sentry-cloudflare-sdk

Full Sentry SDK setup for Cloudflare Workers and Pages. Use when asked to "add Sentry to Cloudflare Workers", "install @sentry/cloudflare", or configure error monitoring, tracing, logging, crons, or AI monitoring for Cloudflare Workers, Pages, Durable Objects, Queues, Workflows, or Hono on Cloudflare.

getsentry/sentry-cocoa-sdk

Full Sentry SDK setup for Apple platforms (iOS, macOS, tvOS, watchOS, visionOS). Use when asked to "add Sentry to iOS", "add Sentry to Swift", "install sentry-cocoa", or configure error monitoring, tracing, profiling, session replay, logging, or metrics for Apple applications. Supports SwiftUI and UIKit.

getsentry/sentry-code-review

Analyze and resolve Sentry comments on GitHub Pull Requests. Use this when asked to review or fix issues identified by Sentry in PR comments. Can review specific PRs by number or automatically find recent PRs with Sentry feedback.

getsentry/sentry-create-alert

Create Sentry alerts using the workflow engine API. Use when asked to create alerts, set up notifications, configure issue priority alerts, or build workflow automations. Supports email, Slack, PagerDuty, Discord, and other notification actions.

getsentry/sentry-dotnet-sdk

Full Sentry SDK setup for .NET. Use when asked to "add Sentry to .NET", "install Sentry for C#", or configure error monitoring, tracing, profiling, logging, or crons for ASP.NET Core, MAUI, WPF, WinForms, Blazor, Azure Functions, or any other .NET application.

getsentry/sentry-elixir-sdk

Full Sentry SDK setup for Elixir. Use when asked to "add Sentry to Elixir", "install sentry for Elixir", or configure error monitoring, tracing, logging, or crons for Elixir, Phoenix, or Plug applications. Supports Phoenix, Plug, LiveView, Oban, and Quantum.

getsentry/sentry-feature-setup

Configure specific Sentry features beyond basic SDK setup. Use when asked to monitor AI/LLM calls, set up OpenTelemetry pipelines, create alerts and notifications, or enable span streaming.

getsentry/sentry-fix-issues

Find and fix issues from Sentry using MCP. Use when asked to fix Sentry errors, debug production issues, investigate exceptions, or resolve bugs reported in Sentry. Methodically analyzes stack traces, breadcrumbs, traces, and context to identify root causes.

getsentry/sentry-flutter-sdk

Full Sentry SDK setup for Flutter and Dart. Use when asked to "add Sentry to Flutter", "install sentry_flutter", "setup Sentry in Dart", or configure error monitoring, tracing, profiling, session replay, or logging for Flutter applications. Supports Android, iOS, macOS, Linux, Windows, and Web.

getsentry/sentry-go-sdk

Full Sentry SDK setup for Go. Use when asked to "add Sentry to Go", "install sentry-go", "setup Sentry in Go", or configure error monitoring, tracing, logging, metrics, or crons for Go applications. Supports net/http, Gin, Echo, Fiber, FastHTTP, Iris, Negroni, and gRPC.

getsentry/sentry-nestjs-sdk

Full Sentry SDK setup for NestJS. Use when asked to "add Sentry to NestJS", "install @sentry/nestjs", "setup Sentry in NestJS", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for NestJS applications. Supports Express and Fastify adapters, GraphQL, microservices, WebSockets, and background jobs.

getsentry/sentry-nextjs-sdk

Full Sentry SDK setup for Next.js. Use when asked to "add Sentry to Next.js", "install @sentry/nextjs", or configure error monitoring, tracing, session replay, logging, profiling, AI monitoring, or crons for Next.js applications. Supports Next.js 13+ with App Router and Pages Router.

getsentry/sentry-node-sdk

Full Sentry SDK setup for Node.js, Bun, and Deno. Use when asked to "add Sentry to Node.js", "add Sentry to Bun", "add Sentry to Deno", "install @sentry/node", "@sentry/bun", or "@sentry/deno", or configure error monitoring, tracing, logging, profiling, metrics, crons, or AI monitoring for server-side JavaScript/TypeScript runtimes.

getsentry/sentry-php-sdk

Full Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, profiling, logging, metrics, or crons for PHP applications. Supports plain PHP, Laravel, and Symfony.

getsentry/sentry-pr-code-review

Review a project's PRs to check for issues detected in code review by Seer Bug Prediction. Use when asked to review or fix issues identified by Sentry in PR comments, or to find recent PRs with Sentry feedback.

getsentry/sentry-python-sdk

Full Sentry SDK setup for Python. Use when asked to "add Sentry to Python", "install sentry-sdk", "setup Sentry in Python", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for Python applications. Supports Django, Flask, FastAPI, Celery, Starlette, AIOHTTP, Tornado, and more.

getsentry/sentry-react-native-sdk

Full Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or configure error monitoring, tracing, profiling, session replay, or logging for React Native applications. Supports Expo managed, Expo bare, and vanilla React Native.

getsentry/sentry-react-sdk

Full Sentry SDK setup for React. Use when asked to "add Sentry to React", "install @sentry/react", or configure error monitoring, tracing, session replay, profiling, or logging for React applications. Supports React 16+, React Router v5-v7 non-framework mode, TanStack Router, Redux, Vite, and webpack.

Verwandte Skills