Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)17k · #10759

sentry-triage

Skill này làm gì

Skill này giúp agent AI tìm hiểu một lỗi được báo cáo trong Sentry mà không cần sao chép stack trace bằng tay. Skill dành cho lập trình viên cần tìm nguyên nhân của một cảnh báo mới hoặc một lỗi tái diễn.

Khi nào nên dùng

  • ✓Khi một cảnh báo Sentry mới đến và bạn muốn agent điều tra, không chỉ lặp lại tiêu đề.
  • ✓Khi một lỗi có vẻ xuất hiện sau một bản phát hành và bạn muốn tìm commit và file nghi vấn.
  • ✓Khi bạn muốn bản tóm tắt các lỗi chưa xử lý hàng đầu kèm gợi ý để tái hiện chúng.

Liên kết skill

https://github.com/composio-community/awesome-codex-skills/blob/master/sentry-triage/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/composio-community/awesome-codex-skills/blob/master/sentry-triage/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Có một cảnh báo Sentry mới cho trang thanh toán. Bạn có thể điều tra và cho tôi biết file nào có khả năng gây ra lỗi không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent lấy issue và sự kiện mới nhất của nó qua công cụ Composio, bao gồm stack trace và breadcrumb. Sau đó nó ánh xạ từng khung stack với file nguồn tương ứng trong dự án và đề xuất cách sửa.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Sentry Triage

Pull Sentry issues, events, and suspect commits straight into the agent via the Composio CLI. Skip the copy-paste-stack-trace dance.

When to Use

  • New Sentry alert and you want the agent to investigate, not just quote the subject line.
  • Diagnosing a regression: find the releases, suspect commit, and affected files.
  • Building a "top 10 unresolved issues" digest with reproduction hints.

Prereqs

curl -fsSL https://composio.dev/install | bash
composio login
composio link sentry        # auth token with event:read + project:read

Discover Tools

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

Common slugs (verify with --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

Diagnose a Single Issue

  1. Fetch the issue (by short ID like PROJ-1F4 or numeric ID):
    composio execute SENTRY_GET_AN_ISSUE -d '{"issue_id":"PROJ-1F4"}'
    
  2. Grab the latest event with full stack + breadcrumbs:
    composio execute SENTRY_LIST_AN_ISSUES_EVENTS \
      -d '{"issue_id":"PROJ-1F4","full":true,"limit":1}'
    
  3. Map each frame to local source. For each filename + lineno in the stack, the agent opens the file and reads ±20 lines. No manual copy-paste.
  4. Check suspect commits (Sentry attaches these when release tracking is set up) — open them with git show <sha> locally.
  5. Propose a fix with a diff, run tests, and — once green — mark the issue resolved:
    composio execute SENTRY_UPDATE_AN_ISSUE \
      -d '{"issue_id":"PROJ-1F4","status":"resolved","statusDetails":{"inNextRelease":true}}'
    

Triage a Batch

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

Pipe into jq for a ranked summary:

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

Workflow File

scripts/sentry-diag.ts, run with 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));

The agent then reads each file at line ± 20 and drafts a patch.

Route to Linear / Slack

Chain tools to open a ticket for the top unresolved issue:

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}`
  });
'

Troubleshooting

  • 404 on issue_id → use the short ID (PROJ-1F4), not the URL slug.
  • Empty events → the issue was resolved/archived; query with query:"is:resolved" or bump limit.
  • Missing suspect commit → release tracking isn't configured in Sentry; set up sentry-cli releases in CI.
  • No inApp frames → source maps not uploaded; stack will only show vendor code.

Full CLI reference: docs.composio.dev/docs/cli

Câu hỏi thường gặp

Tôi cần gì để kết nối Sentry?

Bạn liên kết Sentry qua công cụ Composio với một token có quyền đọc sự kiện và dự án.

Nó có đọc được stack trace không?

Có. Nó lấy sự kiện mới nhất với đầy đủ stack trace và breadcrumb.

Nó có thay đổi issue trong Sentry không?

Skill có một hành động cập nhật, nên nó có thể thay đổi issue khi bạn yêu cầu.

Chi tiết

Mô tả gốc của tác giả

Diagnose Sentry issues without copy-pasting stack traces. Uses the Composio CLI to pull issue details, events, breadcrumbs, and suspect commits, then maps the frames to local source so the agent can propose a fix directly.

repo: composio-community/awesome-codex-skills

Độ phổ biến

Sao GitHub
17k
Vị trí xếp hạng
#10759
Giấy phép
—
Cập nhật
25/7/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự