Skip to content

BuilderIO/agent-native / templates/analytics/.builder/skills/sentry

sentry

Verified

Track external Sentry errors and issues, and route first-party captured errors to Agent-Native Analytics. Use this skill when the user asks about errors, exceptions, error trends, or application health.

Sentry Integration

Connection

  • Base URL: https://sentry.io/api/0
  • Org slug: discovered from the token's accessible organizations by default. Configure SENTRY_ORG_SLUG or pass orgSlug to the sentry action when a user needs a specific Sentry organization.
  • Auth: Authorization: Bearer $SENTRY_SERVER_TOKEN (internal integration token, NOT user auth token or DSN)
  • Env vars: SENTRY_SERVER_TOKEN (falls back to SENTRY_AUTH_TOKEN)
  • Caching: 5-minute in-memory cache, max 100 entries
  • Scopes needed: alerts:read, event:read, org:read, project:distribution, project:read, team:read

Server Lib & API Routes

  • File: server/lib/sentry.ts

Exported Functions

FunctionDescription
listProjects()List all projects in the org
listIssues(projectSlug?, query?, statsPeriod?)List issues (project-scoped or org-wide)
getIssueEvents(issueId)Events for a specific issue
getOrganizationStats(statsPeriod?, category?)Org-level error stats over time

Agent Action

Use sentry for all agent-facing Sentry work. Do not call /api/sentry/* directly from the agent.

ModeArgsDescription
organizationsList organizations visible to the token
issuesstatsPeriod, project, query, orgSlugFrequent issues, sorted by frequency
projectsorgSlugList projects
issue-eventsissueId, orgSlugEvents for a specific issue
statsstatsPeriod, category, orgSlugOrg-level stats

API Routes

RouteDescription
GET /api/sentry/projectsList projects
GET /api/sentry/issuesList issues
GET /api/sentry/issue-eventsEvents for an issue
GET /api/sentry/statsOrg error stats

Dashboard

  • /adhoc/sentry — Sentry Error Health dashboard

First-party Agent-Native Analytics errors

Agent-Native Analytics has its own Sentry-style error store, separate from the external Sentry connection. Browser configureTracking() and server captureError() can both emit $exception events when their Analytics keys are configured; Analytics groups them under Monitoring -> Errors without an external Sentry credential.

Use these authenticated actions for first-party issues:

ActionPurpose
list-error-issuesFind grouped captured issues, filtered by status or search.
get-error-issueRead occurrences, stacks, tags, breadcrumbs, and replay links.
resolve-error-issueResolve, ignore, or reopen an issue after triage.

Use query-agent-native-analytics only for bounded analytics_events or $ai_generation correlation; it does not expose the error_issues or error_events tables.

Key Patterns & Gotchas

  • Token type: This is a custom/internal integration token from Sentry's integration settings TOKEN table (not the Client Secret)
  • getOrganizationStats uses stats_v2 endpoint with field=sum(quantity), groupBy=outcome, default category error
  • If the default org is wrong, pass orgSlug explicitly in the action call.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 117kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 117kUpdated Claude CodeCodexVerifiedInstall