RedPlanetHQ/core

New Integration: Datadog

Ouverte

#541 ouverte le 24 févr. 2026

 (1 commentaire) (0 réaction) (0 personne assignée)TypeScript (184 forks)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

Métriques du dépôt

Stars
 (1 930 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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 tracking
  • integrations/linear/ - For incident/issue patterns
  • integrations/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/
  • 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 events
  • GET /api/v1/monitor - List monitors (alerts)
  • GET /api/v1/monitor/{monitor_id} - Get monitor details
  • GET /api/v1/dashboard - List dashboards
  • GET /api/v1/dashboard/{dashboard_id} - Get dashboard details
  • GET /api/v2/incidents - List incidents
  • GET /api/v2/incidents/{incident_id} - Get incident details
  • GET /api/v1/downtime - List scheduled downtimes
  • POST /api/v1/query - Query time-series metrics
  • GET /api/v2/logs/events - Search logs
  • GET /api/v1/synthetics/tests - List synthetic tests
  • GET /api/v2/teams - List teams
  • GET /api/v2/users - List users
  • GET /api/v1/org - Get organization info

Events to Track

  1. Monitors & Alerts

    • Monitor triggered (alert, warning, no data)
    • Monitor recovered
    • Monitor created, updated, deleted
    • Downtime scheduled/cancelled
  2. Incidents

    • Incident created, updated, resolved
    • Incident severity changes
    • Incident timeline updates
    • Postmortem created
  3. 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.ts pattern
  • Implement API Key + Application Key authentication in account-create.ts
  • Create Datadog API utilities in utils.ts
  • Implement sync logic in schedule.ts using 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 start and end parameters.
  • 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-client npm package for TypeScript.

Resources

Labels

enhancement, integration, new-feature

Guide contributeur