enhancementgood first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (Avg merge 3h 2m) (10 merged PRs in 30d)
Description
Description
Add Datadog integration to sync monitoring alerts, events, dashboards, incidents, and observability data into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/github/- Developer tooling with event trackingintegrations/linear/- For incident/issue patternsintegrations/slack/- For reference
Required Files Structure
integrations/datadog/
├── src/
│ ├── index.ts # Main entry, API spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Datadog API utilities
│ ├── account-create.ts # Auth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Datadog API Integration
OAuth Setup
- Use API Key + Application Key authentication
- API Key header:
DD-API-KEY - Application Key header:
DD-APPLICATION-KEY - Base URL varies by region:
- US1:
https://api.datadoghq.com/api/ - US3:
https://api.us3.datadoghq.com/api/ - US5:
https://api.us5.datadoghq.com/api/ - EU:
https://api.datadoghq.eu/api/ - AP1:
https://api.ap1.datadoghq.com/api/
- US1:
- Datadog also supports OAuth 2.0 for marketplace integrations via Authorization Code Grant
- OAuth Authorization URL:
https://app.datadoghq.com/oauth2/v1/authorize - OAuth Token URL:
https://app.datadoghq.com/oauth2/v1/token
Key Endpoints
GET /api/v1/events- List eventsGET /api/v1/monitor- List monitors (alerts)GET /api/v1/monitor/{monitor_id}- Get monitor detailsGET /api/v1/dashboard- List dashboardsGET /api/v1/dashboard/{dashboard_id}- Get dashboard detailsGET /api/v2/incidents- List incidentsGET /api/v2/incidents/{incident_id}- Get incident detailsGET /api/v1/downtime- List scheduled downtimesPOST /api/v1/query- Query time-series metricsGET /api/v2/logs/events- Search logsGET /api/v1/synthetics/tests- List synthetic testsGET /api/v2/teams- List teamsGET /api/v2/users- List usersGET /api/v1/org- Get organization info
Events to Track
-
Monitors & Alerts
- Monitor triggered (alert, warning, no data)
- Monitor recovered
- Monitor created, updated, deleted
- Downtime scheduled/cancelled
-
Incidents
- Incident created, updated, resolved
- Incident severity changes
- Incident timeline updates
- Postmortem created
-
Events & Logs
- Custom events posted
- Error log patterns
- Anomaly detection alerts
- SLO status changes
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement API Key + Application Key authentication in
account-create.ts - Create Datadog API utilities in
utils.ts - Implement sync logic in
schedule.tsusing events and monitors endpoints - Convert Datadog events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Datadog uses a dual-key authentication system: API Key (for sending data) + Application Key (for reading data and managing resources).
- The API has both v1 and v2 endpoints. v2 is preferred where available (incidents, logs, teams, users).
- Base URL depends on the customer's Datadog region (US1, US3, US5, EU, AP1). The integration must support region selection.
- Rate limits vary by endpoint. Default is 300 requests/hour for most endpoints; some have higher limits.
- Events endpoint supports time-range filtering with
startandendparameters. - Pagination varies: v1 uses offset-based, v2 uses cursor-based pagination.
- Datadog also supports OAuth 2.0 for marketplace/partner integrations, which may be preferred over API keys.
- Consider using the official
@datadog/datadog-api-clientnpm package for TypeScript.
Resources
- Datadog API Reference
- Using the Datadog API
- Datadog API Collection (Postman)
- Datadog Docs
- Datadog API Client (npm)
Labels
enhancement, integration, new-feature