Skip to content

Commit bb7e28a

Browse files
committed
Rename monitoring alert policies and update documentation links
1 parent b743af6 commit bb7e28a

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

infra/monitoring.tf

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
resource "google_monitoring_alert_policy" "dataform_trigger" {
1+
resource "google_monitoring_alert_policy" "dataform_service_error" {
22
combiner = "OR"
3-
display_name = "Dataform Trigger Function Error"
3+
display_name = "Dataform Service Error"
44
enabled = true
55
notification_channels = ["projects/${var.project}/notificationChannels/5647028675917298338"]
66
project = var.project
@@ -17,22 +17,21 @@ resource "google_monitoring_alert_policy" "dataform_trigger" {
1717
display_name = "Log match condition"
1818
condition_matched_log {
1919
filter = <<EOF
20-
resource.type="cloud_function"
21-
resource.labels.function_name="dataform-trigger"
20+
resource.type="cloud_run_revision"
21+
resource.labels.service_name="dataform-service"
2222
severity=ERROR
2323
EOF
2424
label_extractors = {}
2525
}
2626
}
2727
documentation {
28-
content = "Function source: https://github.com/HTTPArchive/dataform/tree/main/infra/dataform-trigger"
28+
content = "Function source: https://github.com/HTTPArchive/dataform/tree/main/infra/dataform-service"
2929
}
3030
}
3131

32-
33-
resource "google_monitoring_alert_policy" "dataform_export" {
32+
resource "google_monitoring_alert_policy" "bigquery_export_error" {
3433
combiner = "OR"
35-
display_name = "Dataform Export Function Error"
34+
display_name = "BigQuery Export Error"
3635
enabled = true
3736
notification_channels = ["projects/${var.project}/notificationChannels/5647028675917298338"]
3837
project = var.project
@@ -49,19 +48,18 @@ resource "google_monitoring_alert_policy" "dataform_export" {
4948
display_name = "Log match condition"
5049
condition_matched_log {
5150
filter = <<EOF
52-
resource.type="cloud_function"
53-
resource.labels.function_name="dataform-export"
51+
resource.type="cloud_run_job"
52+
resource.labels.job_name="bigquery-export"
5453
severity=ERROR
5554
EOF
5655
label_extractors = {}
5756
}
5857
}
5958
documentation {
60-
content = "Function source: https://github.com/HTTPArchive/dataform/tree/main/infra/dataform-export"
59+
content = "Function source: https://github.com/HTTPArchive/dataform/tree/main/infra/bigquery-export"
6160
}
6261
}
6362

64-
6563
resource "google_monitoring_alert_policy" "dataform_workflow" {
6664
combiner = "OR"
6765
display_name = "Dataform Workflow Invocation Failed"

0 commit comments

Comments
 (0)