Skip to content

Datadog 公式 API クライアントを使う integration/datadog パッケージを追加#28

Merged
keyskey merged 2 commits into
mainfrom
feat/datadog-api-client
May 7, 2026
Merged

Datadog 公式 API クライアントを使う integration/datadog パッケージを追加#28
keyskey merged 2 commits into
mainfrom
feat/datadog-api-client

Conversation

@keyskey

@keyskey keyskey commented May 7, 2026

Copy link
Copy Markdown
Owner

概要

自前の REST 呼び出しではなく、公式 datadog-api-client-go/v2 で Monitor 一覧取得と認証・サイト設定を行う internal/integration/datadog を追加する。

変更内容

  • ListMonitors: 生成クライアントのページング付き一覧で全件取得し、id / name / tags の薄い Monitor 型にマッピング
  • MonitorAppURL: 既存どおり app URL の組み立て
  • テスト: httptest + ConfigurationScheme / Host および APIBaseURL で API ベースを差し替え
  • go.mod: github.com/DataDog/datadog-api-client-go/v2 v2.54.0 と間接依存
  • 親パッケージ internal/integrationdoc.go で、ベンダーサブパッケージ配置と manifest/gate 非依存を明記

スコープ外(別 PR 予定)

charge --datadog-discover、manifest の resolved / observability ゲート連携、関連ドキュメント一式は含めない。

テスト

  • go test ./internal/integration/...
  • (push 時)pre-push で go vet ./... 等が通過済み

Made with Cursor

keyskey and others added 2 commits May 7, 2026 16:48
Introduce internal/integration/datadog with ListMonitors (paginated) and
monitor app URL helper; wire go.mod to datadog-api-client-go/v2. Parent
integration package doc clarifies vendor subpackage layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@keyskey keyskey merged commit 0d79d32 into main May 7, 2026
2 checks passed
@keyskey keyskey deleted the feat/datadog-api-client branch May 7, 2026 08:01
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.

1 participant