Disable exception alerting when service is disabled#1383
Merged
Conversation
dee171a to
9e150d9
Compare
If SERVICE_ENABLED is false we put up a maintenence page which is a 503 response. This is considered an exception so it sets off our app insights exception alert. Instead we can just not enable this alert in this situation, however the rest of the alerts are still enabled as the environment is still running regardless of whether the app is serving normal requests.
9e150d9 to
6eb1f10
Compare
|
josielsouzanordcloud
approved these changes
Apr 30, 2026
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.



Description
If SERVICE_ENABLED is false we put up a maintenence page which is a 503 response. This is considered an exception so it sets off our app insights exception alert.
Instead I was thinking we can just not enable this alert in this situation.
The rest of the alerts should still be enabled as the environment is still running regardless of whether the app is serving normal requests.
Jira link
Review notes
I moved locals.env_from_yaml to the top level in order to make the variables accessible in the infra module. Not sure if this is the best way to do it.
I wasn't particularly confident in my terraform-fu so I ran some terraform plans to check, and it will have the intended effect of destroying the appi-prod-uks-manbrs-exceptions-alert on prod.
The plan also includes some update-in-place stuff I wasn't expecting. Not sure where the drift has come from as it seems unrelated to my change - is it safe to ignore?
E.g. this one is being updated to match the devops templates, which has
enabled_metric = ["AllMetrics"]`Review checklist
/api/v1/), confirm whether it is a breaking change — if so, a new major version (/api/v2/) is required (see ADR-006)