HO-CTO / sre-monitoring-as-code

Monitoring-as-Code (MaC) is a jsonnet mixin implementation of SLIs/SLO/Error Budgets using the open-source monitoring and alerting eco-system of Prometheus and Grafana.
https://ho-cto.github.io/sre-monitoring-as-code/
MIT License
23 stars 15 forks source link

fix: Generate correct value for SLI even if there are no metrics available (div/0) #677

Closed sponte closed 1 month ago

sponte commented 1 month ago

Purpose of pull request

Some SLIs fail to generate a valid metric when there is no data. This PR protects from that behaviour by defaulting to no failures if the data is not available.