Skip to content

Commit

Permalink
fix(slack-notifier): exclude health checks from alerts (#1335)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

Logging has changed a bit so need to change the endpoint to exclude from
alerts. We don't want to log the health-check endpoint traces, but that
has to be tweaked in another PR

## Related Issue(s)

- N/A

Slack discussion:
https://digdir.slack.com/archives/C079XRW5G5A/p1729643530959569

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced alerting logic for the Slack Notifier function app to broaden
the scope of monitored requests.
- Defined SKU parameters to ensure valid options for resource
deployment.

- **Bug Fixes**
- Adjusted criteria for exception alerting to improve monitoring
accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
arealmaas authored Oct 23, 2024
1 parent 6b926f4 commit 0a4331a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .azure/modules/functionApp/slackNotifier.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ var query = '''
| where type != "ZiggyCreatures.Caching.Fusion.SyntheticTimeoutException"),
(traces
| where severityLevel >= 3 or (severityLevel >= 2 and customDimensions.SourceContext startswith "Digdir"))
| where operation_Name !startswith "GET /health/"
| where customDimensions.RequestPath !startswith "/health"
| summarize Count = count()
by
Environment = tostring(customDimensions.AspNetCoreEnvironment),
Expand Down

0 comments on commit 0a4331a

Please sign in to comment.