azure application insights static metrics does not exsit trick

Remember when you're trying to create a static mertric (azurerm_monitor_metric_alert), get it into terraform and when you deploy it, it failed because it does not exist in production. These metrics are not being sent into application insights via otel collector. 

How do you get the metric setup in terraform? Instead of using the one above, we can use azurerm_monitor_scheduled_query_rules_alert to sett up the query instead. 

Craft that in a way that even if the metric does not exist, we are still good. Then we can avoid this error when deployment to PROD.

 











Comments

Popular posts from this blog

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

llama cpp running it in google colab