Communityコーディング&開発github.com

ComposioHQ/sentry-triage

スタックトレースのコピペ不要でSentryの問題を診断します。Composio CLIを使用して問題の詳細、イベント、ブレッドクラム、疑わしいコミットを取得し、フレームをローカルソースにマッピングしてエージェントが直接修正を提案できるようにします。

sentry-triage とは?

このスキルは、Sentryが報告するエラーの診断と修正を自動化するためのAIエージェント拡張です。従来、開発者はSentryのアラート画面からスタックトレースを手動でコピーし、エディタに貼り付けて調査していましたが、このスキルはComposio CLIを介してSentry APIに直接アクセスし、問題(イシュー)の詳細、関連するイベント、ブレッドクラム、さらに疑わしいコミット情報をエージェントに取り込みます。エージェントはスタックフレーム内の各ファイルと行番号を自動的に特定し、ローカルのソースコードを参照しながら根本原因を分析し、修正パッチを提案できます。対応プラットフォームはClaude Code、Coder、Cursor、CodexなどのComposio対応エージェントで、Linux/macOS環境で動作します。単一の問題の診断に加えて、未解決の問題の一覧を取得し、重要度順に並べ替えたり、LinearやSlackと連携してチケットを作成したりするバッチ処理も可能です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/sentry-triage

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Sentry Triage

Composio CLI を介してSentryのイシュー、イベント、および疑わしいコミットをエージェントに直接取り込みます。スタックトレースのコピペ作業は不要です。

使用すべきタイミング

  • 新しいSentryアラートが届き、件名だけでなくエージェントに詳細を調査させたい場合。
  • 回帰の診断:リリース、疑わしいコミット、影響を受けるファイルを特定する場合。
  • 再現ヒントを含む「未解決トップ10イシュー」のダイジェストを作成する場合。

前提条件

curl -fsSL https://composio.dev/install | bash
composio login
composio link sentry        # event:read および project:read 権限を持つ認証トークン

ツールの確認

composio search "get sentry issue" --toolkits sentry
composio search "list events for issue" --toolkits sentry
composio tools list sentry

よく使うスラッグ(--get-schema で確認してください):

  • SENTRY_GET_AN_ISSUE
  • SENTRY_LIST_AN_ISSUES_EVENTS
  • SENTRY_RETRIEVE_AN_EVENT_FOR_A_PROJECT
  • SENTRY_LIST_A_PROJECTS_ISSUES
  • SENTRY_UPDATE_AN_ISSUE

単一イシューの診断

  1. イシューを取得(ショートID(PROJ-1F4など)または数値IDを使用):
    composio execute SENTRY_GET_AN_ISSUE -d '{"issue_id":"PROJ-1F4"}'
    
  2. 最新のイベントを取得(完全なスタックトレースとブレッドクラムを含む):
    composio execute SENTRY_LIST_AN_ISSUES_EVENTS \
      -d '{"issue_id":"PROJ-1F4","full":true,"limit":1}'
    
  3. 各フレームをローカルソースにマッピング。 スタック内の各 filename + lineno に対して、エージェントがファイルを開き、前後±20行を読み取ります。手動でのコピペは不要です。
  4. 疑わしいコミットを確認(リリース追跡が設定されている場合、Sentryがこれらのコミットを添付します)— ローカルで git show <sha> を使用して開きます。
  5. 修正を提案(差分付き)、テストを実行し、すべてが正常になったらイシューを解決済みにマーク:
    composio execute SENTRY_UPDATE_AN_ISSUE \
      -d '{"issue_id":"PROJ-1F4","status":"resolved","statusDetails":{"inNextRelease":true}}'
    

バッチ処理

composio execute SENTRY_LIST_A_PROJECTS_ISSUES -d '{
  "organization_slug":"acme",
  "project_slug":"api",
  "query":"is:unresolved age:-24h",
  "sort":"freq",
  "limit":20
}'

ランキングサマリーとして jq にパイプ:

composio execute SENTRY_LIST_A_PROJECTS_ISSUES -d '{"organization_slug":"acme","project_slug":"api","query":"is:unresolved"}' \
  | jq -r '.[] | "\(.count)\t\(.shortId)\t\(.title)"' | sort -rn | head

ワークフローファイル

scripts/sentry-diag.ts、実行方法: composio run --file scripts/sentry-diag.ts -- --id PROJ-1F4

const id = process.argv[process.argv.indexOf("--id") + 1];

const issue = await execute("SENTRY_GET_AN_ISSUE", { issue_id: id });
const [event] = await execute("SENTRY_LIST_AN_ISSUES_EVENTS", {
  issue_id: id, full: true, limit: 1
});

const frames = (event?.entries ?? [])
  .filter(e => e.type === "exception")
  .flatMap(e => e.data.values.flatMap(v => v.stacktrace?.frames ?? []))
  .filter(f => f.inApp)
  .map(f => ({ file: f.filename, line: f.lineno, fn: f.function }));

console.log(JSON.stringify({ title: issue.title, culprit: issue.culprit, frames }, null, 2));

その後、エージェントは各 file の line ± 20 を読み取り、パッチを作成します。

Linear / Slack へのルーティング

ツールを連鎖させて、未解決のトップイシューのチケットを開く:

composio run '
  const [top] = await execute("SENTRY_LIST_A_PROJECTS_ISSUES", {
    organization_slug: "acme", project_slug: "api",
    query: "is:unresolved", sort: "freq", limit: 1
  });
  await execute("LINEAR_CREATE_ISSUE", {
    teamId: "TEAM_ID",
    title: `[Sentry] ${top.title}`,
    description: `Short ID: ${top.shortId}\nPermalink: ${top.permalink}\nCount: ${top.count}`
  });
'

トラブルシューティング

  • issue_id で 404 エラー → URLスラッグではなく、ショートID(PROJ-1F4)を使用してください。
  • 空のイベント → イシューが解決済み/アーカイブされている可能性があります。query:"is:resolved" でクエリするか、limit を増やしてください。
  • 疑わしいコミットがない → Sentryでリリース追跡が設定されていません。CIで sentry-cli releases を設定してください。
  • inApp フレームがない → ソースマップがアップロードされていません。スタックにはベンダーコードのみが表示されます。

CLIの完全なリファレンス: docs.composio.dev/docs/cli

Individual skills in this repo

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

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

関連スキル