Closed mariohoyos92 closed 3 days ago
Thanks for reporting! I'll try to take a look within one week.
I reproduced the issue and identified the cause. Trying to figure out how to fix it..
The fix has been released, which should fix this issue. Closing it. Feel free to reopen it if you have any question.
Expected Behavior
When using the
high_error_rate
recommended monitor, I would expect this to successfully create a monitor.Actual Behavior
When using the
high_error_rate
recommended monitor, I get400 Bad Request: This could be due to incorrect syntax or a missing required tag for high_error_rate
.I believe this is happening because when we fetch the recommended monitors from datadog, there isn't anything that's returned that would get keyed as
high_error_rate
so theisRecommendedMonitor
function returnsfalse
and we never set aquery
in the request body to create the monitor.I also think this line https://github.com/DataDog/serverless-plugin-datadog/blob/2d1e5f66bd950f5d0f4d50f2759de46ee4873e62/src/monitor-api-requests.ts#L214 doesn't really do anything, because after inspecting the payload we get from datadog the ids are keyed with
serverless-
notserverless_
Steps to Reproduce the Problem
Specifications
Stacktrace
Here is what I logged out when calling the
getRecommendedMonitors
api