Skip to content

feat(datadog): add the Datadog v1 SDK (monitors + service level objectives) - #456

Draft
gwkline wants to merge 2 commits into
alchemy-run:mainfrom
gwkline:gwkline/datadog
Draft

feat(datadog): add the Datadog v1 SDK (monitors + service level objectives)#456
gwkline wants to merge 2 commits into
alchemy-run:mainfrom
gwkline:gwkline/datadog

Conversation

@gwkline

@gwkline gwkline commented Aug 14, 2026

Copy link
Copy Markdown

New @distilled.cloud/datadog package generated from Datadog's official v1 OpenAPI description, covering the Monitors and Service Level Objectives services. Companion to alchemy-run/alchemy#1215, which builds Datadog.Monitor / Datadog.ServiceLevelObjective alchemy resources on these operations.

import * as Monitors from "@distilled.cloud/datadog/monitors";

const monitor = yield* Monitors.createMonitor;
yield* monitor({
  type: "query alert",
  query: "avg(last_5m):avg:system.cpu.user{*} > 90",
  name: "High CPU",
});
  • Spec source: sparse-checked-out submodule of DataDog/datadog-api-client-typescript narrowed to .generator/schemas/v1/openapi.yaml (~1.6 MB on disk; specs:fetch follows the github package's recipe, README documents the sparse footgun).
  • Pipeline: the GitHub tag-bucketed shape — YAML parsed with Bun.YAML, patch chain applied once to the full document, operations bucketed by primary tag, converted per-tag via convertOpenApiToSmithy. Tags are allowlisted (TAG_ALLOWLIST in scripts/convert.ts) so every generated operation has a live consumer; coverage grows tag-by-tag (Downtimes, Dashboards, Synthetics, …).
  • Protocol: key-authenticated REST via makeRestProtocolDD-API-KEY + optional DD-APPLICATION-KEY headers, base URL from Credentials (regional sites via DD_SITE / siteToApiBaseUrl), { "errors": ["…"] } error envelope, UnknownDatadogError fallback.
  • Surface: wire names kept verbatim (snake_case) like github; service modules on subpath imports (@distilled.cloud/datadog/monitors) and the Services barrel — no root spread, since each module defines its own per-status error classes.
  • 2 Smithy models, 20 operations; tsc -b green for both tsconfigs.

Not yet exercised against the live Datadog API — the alchemy PR's lifecycle tests are skipIf-gated on DD_API_KEY/DD_APP_KEY, which weren't available in this environment; first live runs may surface patch-worthy error typings.

🤖 Generated with Claude Code

…tives)

New @distilled.cloud/datadog package generated from Datadog's official v1
OpenAPI description (sparse-checked-out submodule of
DataDog/datadog-api-client-typescript), following the GitHub tag-bucketed
pipeline. Tags are allowlisted — Monitors and Service Level Objectives to
start — and grow as alchemy resources are brought up on them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gwkline added a commit to gwkline/alchemy that referenced this pull request Aug 14, 2026
…tadog

Replace the hand-rolled HTTP client with the generated Datadog SDK from
distilled (alchemy-run/distilled#456): typed per-op error unions
(catchTag("NotFound")), wire-verbatim request/response schemas, and the
shared Credentials/protocol/retry machinery. Follows the Axiom provider
shape exactly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@sam-goodwin

Copy link
Copy Markdown
Collaborator

What's the status here? What's left to be done @Mkassabov @gwkline ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants