-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ees 5686 add public api performance metric alerts #5463
base: dev
Are you sure you want to change the base?
Ees 5686 add public api performance metric alerts #5463
Conversation
…er than higher-level templates
…er than higher-level templates
…er than higher-level templates
…er than higher-level templates
…ileShare.bicep, and correct setting up of alert flags for file shares in functionApp.bicep
…blic-api-performance-metric-alerts-alerts-with-components EES-5686 - moving alert creation into individual component files rather than higher-level templates
@@ -0,0 +1,82 @@ | |||
import { EvaluationFrequency, MetricName, DynamicMetricOperator, ResourceType, TimeAggregation, WindowSize, Severity, Sensitivity, severityMapping } from 'types.bicep' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be formatted into a multi-line import i.e.
import {
EvaluationFrequency,
...
} from 'types.bicep'
Note that the built-in Bicep formatter would normally do this automatically.
You can format directly from VS Code by running Format Document
(using the command palette). It should prompt you to configure a formatter for Bicep, which I think it does automatically, but I you can also manually configure it in your settings.json
.
Would suggest we create a new ticket to add a pre-commit hook to run the Bicep formatter (like how we run Prettier) and then format any other Bicep files so we have a good formatting baseline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good - I've created the following ticket ta: https://dfedigital.atlassian.net/browse/EES-5748
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and formatted the file using CS Code in the meantime)
param sensitivity Sensitivity = 'High' | ||
|
||
param minFailingPeriodsToAlert int = 1 | ||
|
||
param numberOfEvaluationPeriods int = 1 | ||
|
||
param ignoreDataBefore string? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these have descriptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed they should! I've added some now - quite descriptive ones as I feel that these various parameters are a little mysterious unless you know alerts inside and out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flexibleServers
for the directory maybe isn't the best name as it doesn't convey that these alerts are for the Postgres database.
Perhaps postgreSql
or postgres
would be better?
Or, if it's possible to abstract these alerts for any database type, maybe db
could work? (probably needs resourceType
to be configurable though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mostly just to stick with the folder name convention that matched the Azure type of the resources that the alerts were for (in this case Microsoft.DBforPostgreSQL/flexibleServers
). For instance, sites
rather than functionApps
or appServices
as an example. I've got no problem changing it though, and so have done to postgreSqlFlexibleServers
. At some point, the postgresqlDatabase.bicep
file could do with renaming to postgreSqlFlexibleServer.bicep
too.
I think that these alerts will be specific to PostgreSQL FS btw rather than generic to all dbs.
960e4ed
to
aaaccaf
Compare
…micMetricAlert.bicep params that were missing descriptions. Formatted file for cleaner import block.
…o better reflext usage.
aaaccaf
to
6cefbfc
Compare
This PR adds in various alerts related to performance to resources of the Public API.
This introduces the use of dynamic threshold alerts, which use machine learning to determine normal usage patterns for the resources they monitor and determine a dynamic threshold against which to test the performance of the metric they're tracking.
Alerts included in this PR are: