Datadog 公式 API クライアントを使う integration/datadog パッケージを追加#28
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
自前の REST 呼び出しではなく、公式
datadog-api-client-go/v2で Monitor 一覧取得と認証・サイト設定を行うinternal/integration/datadogを追加する。変更内容
ListMonitors: 生成クライアントのページング付き一覧で全件取得し、id/name/tagsの薄いMonitor型にマッピングMonitorAppURL: 既存どおり app URL の組み立てhttptest+ConfigurationのScheme/HostおよびAPIBaseURLで API ベースを差し替えgo.mod:github.com/DataDog/datadog-api-client-go/v2 v2.54.0と間接依存internal/integrationのdoc.goで、ベンダーサブパッケージ配置と manifest/gate 非依存を明記スコープ外(別 PR 予定)
charge --datadog-discover、manifest のresolved/ observability ゲート連携、関連ドキュメント一式は含めない。テスト
go test ./internal/integration/...go vet ./...等が通過済みMade with Cursor