Community生產力與協作github.com

getsentry/sentry-setup-ai-monitoring

在任何專案中設定 Sentry AI 代理監控。用於監控 LLM 呼叫、追蹤 AI 代理、追蹤對話,或對 OpenAI/Anthropic/Vercel AI/LangChain/Google GenAI/Pydantic AI 進行儀器化。可自動偵測已安裝的 AI SDK 並配置適當的整合。

sentry-setup-ai-monitoring 是什麼?

此技能可自動在專案中設定 Sentry 的 AI 代理監控功能。當開發者需要監控 LLM(大型語言模型)呼叫、追蹤 AI 代理對話或對熱門 AI SDK(如 OpenAI、Anthropic、Vercel AI、LangChain、Google GenAI、Pydantic AI)進行儀器化時,此技能會偵測專案中已安裝的相關套件,並配置適當的 Sentry 整合,無需手動設置。它支援多種程式語言與框架(包括 Python、JavaScript、Go 等),並可與 Sentry SDK 版本 >= 2.0.0 配合使用。透過此技能,開發者可以輕鬆啟用即時監控、錯誤追蹤以及 AI 代理效能的詳細洞察。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/getsentry/sentry-for-ai/tree/main/skills/sentry-setup-ai-monitoring

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

sentry-setup-ai-monitoring 是做什麼的?

在任何專案中設定 Sentry AI 代理監控。當被要求監控 LLM 呼叫、追蹤 AI 代理、追蹤對話,或對 OpenAI/Anthropic/Vercel AI/LangChain/Google GenAI/Pydantic AI 進行儀器化時使用。可自動偵測已安裝的 AI SDK 並配置適當的整合。

功能

  • 自動偵測專案中已安裝的 AI SDK
  • 為支援的 SDK 配置 Sentry 整合,包括:
    • OpenAI
    • Anthropic
    • Vercel AI SDK
    • LangChain(Python 與 JavaScript)
    • Google GenAI SDK
    • Pydantic AI
  • 支援 Python、JavaScript(Node.js)、Go 等程式語言
  • 與 Sentry SDK 版本 >= 2.0.0 相容

使用方式

  1. 確保專案中已安裝 Sentry SDK(版本 >= 2.0.0)
  2. 執行此技能:
sentry-setup-ai-monitoring

技能會掃描你的專案相依性,偵測已安裝的 AI SDK,並自動配置適當的 Sentry 整合。

範例

安裝 OpenAI 整合後,你的程式碼可能如下所示:

import sentry_sdk
from sentry_sdk.integrations.openai import OpenAIIntegration

sentry_sdk.init(
    dsn="your-dsn-url",
    integrations=[OpenAIIntegration()],
    traces_sample_rate=1.0,
)

支援的平台

  • Python
  • JavaScript/TypeScript(Node.js)
  • Go(即將推出)

注意事項

  • 請確保你的 Sentry DSN 已正確配置
  • 技能會自動啟用追蹤功能,以擷取 AI 代理的效能資料
  • 如需自訂配置,請參考 Sentry 文件

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-otel-exporter-setup

Configure the OpenTelemetry Collector with Sentry Exporter for multi-project routing and automatic project creation. Use when setting up OTel with Sentry, configuring collector pipelines for traces and logs, or routing telemetry from multiple services to Sentry projects.

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.

相關技能