Repository navigation
feat(obs): the three remaining standalone alarms — failure rate, spot interruptions, impersonation volume (#877) - #1293
Merged
Merged
Conversation
… interruptions, impersonation volume (#877) #1051 shipped queue-oldest and pod-pending; these complete #877's five, each an aggregate with no tenant dimension: - attempt failure rate: failed ÷ (failed + done) of er.tasks.completed over an hour across classes, > 25% with at least 4 attempts. no_op/skipped are left out to stay within the alarm's ten-query ceiling. - spot interruptions: an EventBridge rule on aws.ec2 "EC2 Spot Instance Interruption Warning" and an alarm on its MatchedEvents, > 5/h. - impersonation volume: the BFF's writeAudit prints one identity-free `er.audit.impersonation` line per impersonation event; a log metric filter on the containers log group counts it, > 20/h. Thresholds are module variables; the impersonation pair is skipped when no log group is given. Wired in dev and prod; tftest covers each. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 tasks
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
The fmt + validate gate runs fmt -check recursively; the earlier fmt ran in the module directory alone and skipped tests/.
Contributor
terraform plan
dev — 5 to add, 0 to changemodule.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_region.current: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Reading...
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
module.network.data.aws_region.current: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_iam_policy_document.otel_collector: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=4017345831]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_trust: Read complete after 0s [id=4060172364]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.operations.aws_cloudwatch_event_rule.spot_interruption will be created
+ resource "aws_cloudwatch_event_rule" "spot_interruption" {
+ arn = (known after apply)
+ description = "EC2 Spot interruption warnings, counted for the spot-interruption alarm."
+ event_bus_name = "default"
+ event_pattern = jsonencode(
{
+ detail-type = [
+ "EC2 Spot Instance Interruption Warning",
]
+ source = [
+ "aws.ec2",
]
}
)
+ force_destroy = false
+ id = (known after apply)
+ name = "er-dev-spot-interruption"
+ name_prefix = (known after apply)
+ region = "us-east-2"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.operations.aws_cloudwatch_log_metric_filter.impersonation[0] will be created
+ resource "aws_cloudwatch_log_metric_filter" "impersonation" {
+ apply_on_transformed_logs = (known after apply)
+ id = (known after apply)
+ log_group_name = "/er/dev/containers"
+ name = "er-dev-impersonation"
+ pattern = "\"er.audit.impersonation\""
+ region = "us-east-2"
+ metric_transformation {
+ default_value = "0"
+ name = "er.audit.impersonations"
+ namespace = "ER/Dev"
+ unit = "None"
+ value = "1"
}
}
# module.operations.aws_cloudwatch_metric_alarm.attempt_failure_rate will be created
+ resource "aws_cloudwatch_metric_alarm" "attempt_failure_rate" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 25% of finished task attempts failed in the last hour (with at least 4 attempts). Read the failing tasks' error_class: a config or precondition burst is a tenant's input, an internal or infrastructure burst is ours."
+ alarm_name = "er-dev-attempt-failure-rate"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ region = "us-east-2"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 0.25
+ treat_missing_data = "notBreaching"
+ metric_query {
+ id = "d0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "S"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "M"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "L"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "other"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "S"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "M"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "L"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "other"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Dev"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ expression = "IF((FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)+FILL(d0,0)+FILL(d1,0)+FILL(d2,0)+FILL(d3,0)) >= 4, (FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)) / (FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)+FILL(d0,0)+FILL(d1,0)+FILL(d2,0)+FILL(d3,0)), 0)"
+ id = "rate"
+ return_data = true
# (2 unchanged attributes hidden)
}
}
# module.operations.aws_cloudwatch_metric_alarm.impersonation_volume[0] will be created
+ resource "aws_cloudwatch_metric_alarm" "impersonation_volume" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 20 impersonation events (start, stop or impersonated mutation) in an hour. Read erweb.audit for who and which org; operators impersonate to support a tenant, so a burst is either an incident being worked or a compromised operator session."
+ alarm_name = "er-dev-impersonation-volume"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "er.audit.impersonations"
+ namespace = "ER/Dev"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 3600
+ region = "us-east-2"
+ statistic = "Sum"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 20
+ treat_missing_data = "notBreaching"
}
# module.operations.aws_cloudwatch_metric_alarm.spot_interruptions will be created
+ resource "aws_cloudwatch_metric_alarm" "spot_interruptions" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 5 EC2 Spot interruption warnings in an hour. Runner tasks survive one (do-not-disrupt pods are reclaimed under, then relaunched), but a sustained rate means the spot pools are a poor fit: widen the NodePools' instance families or move a class to on-demand."
+ alarm_name = "er-dev-spot-interruptions"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ dimensions = {
+ "RuleName" = "er-dev-spot-interruption"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "MatchedEvents"
+ namespace = "AWS/Events"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 3600
+ region = "us-east-2"
+ statistic = "Sum"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 5
+ treat_missing_data = "notBreaching"
}
Plan: 5 to add, 0 to change, 0 to destroy.
prod — 5 to add, 0 to changemodule.ses.data.aws_region.current: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_iam_policy_document.pod_trust: Reading...
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.network.data.aws_region.current: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2652188337]
data.aws_iam_policy_document.api_contract_bucket: Reading...
data.aws_iam_policy_document.api_contract_bucket: Read complete after 0s [id=1127163522]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=2453399085]
data.aws_iam_policy_document.ci_deploy_prod_api_contract: Reading...
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_iam_policy_document.ci_deploy_prod_api_contract: Read complete after 0s [id=3801820449]
module.ses.data.aws_iam_policy_document.send: Reading...
module.ses.data.aws_iam_policy_document.send: Read complete after 0s [id=3767633194]
data.aws_iam_policy_document.lake_access: Reading...
module.network.data.aws_availability_zones.available: Read complete after 1s [id=us-east-2]
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
data.aws_iam_policy_document.ci_deploy_prod_trust: Reading...
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 0s [id=4060172364]
data.aws_rds_engine_version.aurora_pg: Read complete after 1s [id=17.9]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=2891227359]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.operations.aws_cloudwatch_event_rule.spot_interruption will be created
+ resource "aws_cloudwatch_event_rule" "spot_interruption" {
+ arn = (known after apply)
+ description = "EC2 Spot interruption warnings, counted for the spot-interruption alarm."
+ event_bus_name = "default"
+ event_pattern = jsonencode(
{
+ detail-type = [
+ "EC2 Spot Instance Interruption Warning",
]
+ source = [
+ "aws.ec2",
]
}
)
+ force_destroy = false
+ id = (known after apply)
+ name = "er-prod-spot-interruption"
+ name_prefix = (known after apply)
+ region = "us-east-2"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.operations.aws_cloudwatch_log_metric_filter.impersonation[0] will be created
+ resource "aws_cloudwatch_log_metric_filter" "impersonation" {
+ apply_on_transformed_logs = (known after apply)
+ id = (known after apply)
+ log_group_name = "/er/prod/containers"
+ name = "er-prod-impersonation"
+ pattern = "\"er.audit.impersonation\""
+ region = "us-east-2"
+ metric_transformation {
+ default_value = "0"
+ name = "er.audit.impersonations"
+ namespace = "ER/Prod"
+ unit = "None"
+ value = "1"
}
}
# module.operations.aws_cloudwatch_metric_alarm.attempt_failure_rate will be created
+ resource "aws_cloudwatch_metric_alarm" "attempt_failure_rate" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 25% of finished task attempts failed in the last hour (with at least 4 attempts). Read the failing tasks' error_class: a config or precondition burst is a tenant's input, an internal or infrastructure burst is ours."
+ alarm_name = "er-prod-attempt-failure-rate"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ region = "us-east-2"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 0.25
+ treat_missing_data = "notBreaching"
+ metric_query {
+ id = "d0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "S"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "M"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "L"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "d3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "done"
+ "resource_class" = "other"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "S"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "M"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "L"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "f3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "outcome" = "failed"
+ "resource_class" = "other"
}
+ metric_name = "er.tasks.completed"
+ namespace = "ER/Prod"
+ period = 3600
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ expression = "IF((FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)+FILL(d0,0)+FILL(d1,0)+FILL(d2,0)+FILL(d3,0)) >= 4, (FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)) / (FILL(f0,0)+FILL(f1,0)+FILL(f2,0)+FILL(f3,0)+FILL(d0,0)+FILL(d1,0)+FILL(d2,0)+FILL(d3,0)), 0)"
+ id = "rate"
+ return_data = true
# (2 unchanged attributes hidden)
}
}
# module.operations.aws_cloudwatch_metric_alarm.impersonation_volume[0] will be created
+ resource "aws_cloudwatch_metric_alarm" "impersonation_volume" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 20 impersonation events (start, stop or impersonated mutation) in an hour. Read erweb.audit for who and which org; operators impersonate to support a tenant, so a burst is either an incident being worked or a compromised operator session."
+ alarm_name = "er-prod-impersonation-volume"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "er.audit.impersonations"
+ namespace = "ER/Prod"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 3600
+ region = "us-east-2"
+ statistic = "Sum"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 20
+ treat_missing_data = "notBreaching"
}
# module.operations.aws_cloudwatch_metric_alarm.spot_interruptions will be created
+ resource "aws_cloudwatch_metric_alarm" "spot_interruptions" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "More than 5 EC2 Spot interruption warnings in an hour. Runner tasks survive one (do-not-disrupt pods are reclaimed under, then relaunched), but a sustained rate means the spot pools are a poor fit: widen the NodePools' instance families or move a class to on-demand."
+ alarm_name = "er-prod-spot-interruptions"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanThreshold"
+ dimensions = {
+ "RuleName" = "er-prod-spot-interruption"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "MatchedEvents"
+ namespace = "AWS/Events"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 3600
+ region = "us-east-2"
+ statistic = "Sum"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 5
+ treat_missing_data = "notBreaching"
}
Plan: 5 to add, 0 to change, 0 to destroy.
|
athvin
temporarily deployed
to
marketing-preview
November 27, 2026 03:24 — with
GitHub Actions
Inactive
athvin
added a commit
that referenced
this pull request
Nov 27, 2026
…fuses filters (#1302) ALLOW-DESTROY #1293's filter on /er/{env}/containers was refused in dev and prod (PutMetricFilter: only supported on the Standard log class); that group is Infrequent Access by the P4 cost decision, so the infra workflow on main would keep failing on it. The filter and its alarm come out; the failure rate and spot interruption alarms stay. The BFF's er.audit.impersonation line remains for #1301 to count through a Standard-class route. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was previously deployed
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.
Closes #877
Adds #877's last three alarms to
modules/operational-observability(failure rate, spot interruptions, impersonation volume), the BFF log line the impersonation filter counts, tftest runs, and the alarm list in the observability skill.#877 (child of #667): five alarms independent of the cost model; two already shipped in #1051.
Proof
terraform testin the module: 3 passed (newstandalone_alarms_877andno_log_group_no_impersonation_alarmruns).terraform validateok.make checkexit 0; frontend unit suite 1104 passed; eslint/tsc/prettier on the audit change.Risk & rollback
Additive Terraform (2 alarms, 1 rule, 1 filter + alarm per env); applied by
infraon main.git revert <merge-sha>removes them.Post-merge ledger
Closed by: agent · session
Claude Code:24d16c2e-fec6-49d8-9797-060338df4848onMac· 2026-11-27T04:01:21Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
2183d5e1— rust 45933961475, frontend 45933961448 success; infra 45933961412 FAILED on the impersonation metric filter (Infrequent-Access log group), fixed forward by fix(infra): remove the impersonation metric filter — its log group refuses filters (#1302) #1303 (f76b16ec, infra 45936844362 success)imagesbuilt, or correctly never ran because nothing that goes intoan image changed: 45933961457 success
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: the BFF audit line ships with the frontend image (deploy 45934160528 success); the alarms are infra-applied — read back after fix(infra): remove the impersonation metric filter — its log group refuses filters (#1302) #1303: er-{dev,prod}-attempt-failure-rate, er-{dev,prod}-spot-interruptions
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: infra red on this SHA, green after fix(infra): remove the impersonation metric filter — its log group refuses filters (#1302) #1303; drift/kind red for known reasons (Confirm the er-alerts email subscription and prove alert delivery #1056, kind probe red since 2026-11-10: KeyError 'token_hash' after the credential-omission fix #1106)
Donethrough the automation rather than byhand, and the issue closed: The five standalone telemetry alarms that need no cost model (runner-pending, queue age, failure rate, spot interruptions, impersonation volume) #877 CLOSED via the merge
(a skill, a reference, memory) — or nothing new was learned: the observability skill records the Infrequent-Access constraint
Specific to this change
infracreated the failure-rate and spot alarms in dev and prod — read back after fix(infra): remove the impersonation metric filter — its log group refuses filters (#1302) #1303; the impersonation pair was refused and removed (Infra on main fails since #1293: the impersonation metric filter targets an Infrequent-Access log group #1302)Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
🤖 Generated with Claude Code