Skip to content

Conversation

@kevinpombo-datadog
Copy link
Contributor

@kevinpombo-datadog kevinpombo-datadog commented Nov 19, 2025

Adding Support for Saving Monitor Assets alongside monitors to support our new Runbooks integration, includes new test cases that handle saving a monitor with multiple runbooks.

PR will be in draft until the api spec changes get merged: https://github.com/DataDog/datadog-api-spec/pull/4551

Copy link
Contributor

@shaneyuandd shaneyuandd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR still in draft. Overall LGTM, left a couple questions.

}

// Assets
if assets := r.buildAssetsStruct(ctx, state.MonitorAssets); len(assets) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: On API level, if client makes an Update Monitor request with assets not defined, does it removed all assets on the monitor or preserving existing assets?

categoryStr, _ := aMap["category"].(string)
nameStr, _ := aMap["name"].(string)
urlStr, _ := aMap["url"].(string)
if categoryStr == "" || nameStr == "" || urlStr == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if this is a possible scenario?

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