enhancementgood first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
Add Sentry integration to sync error events, issues, releases, and performance data into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/github/- Similar developer tool with event trackingintegrations/linear/- Issue tracking integrationintegrations/slack/- For reference
Required Files Structure
integrations/sentry/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Sentry API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Sentry API Integration
OAuth Setup
- Use OAuth 2.0 (Authorization Code Grant)
- API Prefix:
/api/0/ - Authorization URL:
https://sentry.io/oauth/authorize/ - Token URL:
https://sentry.io/oauth/token/ - Required scopes:
event:read- Read access to events and issuesproject:read- Read access to projectsorg:read- Read access to organization datateam:read- Read access to teamsmember:read- Read access to organization membersrelease:read- Read access to releasesalerts:read- Read access to alerts and notification rules
- Access tokens expire after 30 days; use refresh tokens for renewal
Key Endpoints
GET /api/0/organizations/- List organizationsGET /api/0/organizations/{org_slug}/projects/- List projectsGET /api/0/projects/{org_slug}/{project_slug}/issues/- List project issuesGET /api/0/organizations/{org_slug}/issues/- List organization issuesGET /api/0/issues/{issue_id}/events/- List events for an issueGET /api/0/organizations/{org_slug}/events/- List organization eventsGET /api/0/organizations/{org_slug}/releases/- List releasesGET /api/0/projects/{org_slug}/{project_slug}/stats/- Project statsGET /api/0/organizations/{org_slug}/stats_v2/- Organization stats
Events to Track
-
Errors & Issues
- New issues created
- Issue status changes (resolved, ignored, unresolved)
- Issue assignments
- Error frequency spikes
- First seen / last seen updates
-
Releases
- New release deployments
- Release health changes
- Commit associations
- Deploy notifications
-
Performance
- Transaction duration anomalies
- Performance issue detection
- Alert rule triggers
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 flow in
account-create.ts - Create Sentry API utilities in
utils.ts - Implement sync logic in
schedule.tsusing issues and events endpoints - Convert Sentry events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- All API requests go to the
/api/0/prefix and return JSON. - Rate limiting: Sentry uses response headers
X-Sentry-Rate-Limit-RemainingandX-Sentry-Rate-Limit-Reset. - Pagination uses cursor-based pagination with
Linkheaders. - For self-hosted Sentry instances, the base URL will differ from
sentry.io. - Webhooks (via Sentry Integration Platform) can provide real-time event delivery.
- Access tokens expire after 30 days. Implement automatic refresh token rotation.
Resources
- Sentry API Reference
- Sentry Authentication
- Sentry Permissions & Scopes
- Sentry Integration Platform (OAuth)
- Sentry Webhooks
Labels
enhancement, integration, new-feature