Repository navigation
feat(observability): add operational dashboards and alerts (#552) - #1046
Merged
Merged
Conversation
…cklog and pod failures
Contributor
terraform plan
dev — 11 to add, 1 to changeShowing the last 29000 of 98169 characters — the full plan is in the run summary. OD(m3)"
+ id = "r3"
+ label = "other"
},
],
]
+ period = 60
+ region = "us-east-2"
+ stat = "Sum"
+ title = "no_op task events / second"
+ view = "timeSeries"
}
+ type = "metric"
+ width = 12
+ x = 12
+ y = 34
},
+ {
+ height = 6
+ properties = {
+ metrics = [
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "S",
+ "reason",
+ "oom",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "S oom"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "S",
+ "reason",
+ "evicted",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "S evicted"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "M",
+ "reason",
+ "oom",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "M oom"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "M",
+ "reason",
+ "evicted",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "M evicted"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "L",
+ "reason",
+ "oom",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "L oom"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "L",
+ "reason",
+ "evicted",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "L evicted"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "other",
+ "reason",
+ "oom",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "other oom"
},
],
+ [
+ "ER/Dev",
+ "er.pods.failures",
+ "resource_class",
+ "other",
+ "reason",
+ "evicted",
+ "OTelLib",
+ "er-obs",
+ {
+ label = "other evicted"
},
],
]
+ period = 60
+ region = "us-east-2"
+ stat = "Sum"
+ title = "Confirmed pod OOM kills and evictions / minute"
+ view = "timeSeries"
}
+ type = "metric"
+ width = 24
+ x = 0
+ y = 40
},
]
}
)
+ dashboard_name = "er-dev-operations"
+ id = (known after apply)
+ region = "us-east-2"
}
# module.operations.aws_cloudwatch_metric_alarm.pod_failure["evicted"] will be created
+ resource "aws_cloudwatch_metric_alarm" "pod_failure" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "A runner evicted was confirmed in the last five minutes. Inspect the task's durable termination reason and resource class; check memory, ephemeral storage and node disruption before retrying."
+ alarm_name = "er-dev-pod-evicted"
+ 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
+ treat_missing_data = "notBreaching"
+ metric_query {
+ id = "p0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "evicted"
+ "resource_class" = "S"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "evicted"
+ "resource_class" = "M"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "evicted"
+ "resource_class" = "L"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "evicted"
+ "resource_class" = "other"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ expression = "SUM([FILL(p0,0),FILL(p1,0),FILL(p2,0),FILL(p3,0)])"
+ id = "total"
+ return_data = true
# (2 unchanged attributes hidden)
}
}
# module.operations.aws_cloudwatch_metric_alarm.pod_failure["oom"] will be created
+ resource "aws_cloudwatch_metric_alarm" "pod_failure" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "A runner oom was confirmed in the last five minutes. Inspect the task's durable termination reason and resource class; check memory, ephemeral storage and node disruption before retrying."
+ alarm_name = "er-dev-pod-oom"
+ 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
+ treat_missing_data = "notBreaching"
+ metric_query {
+ id = "p0"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "oom"
+ "resource_class" = "S"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p1"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "oom"
+ "resource_class" = "M"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p2"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "oom"
+ "resource_class" = "L"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ id = "p3"
+ return_data = false
# (3 unchanged attributes hidden)
+ metric {
+ dimensions = {
+ "OTelLib" = "er-obs"
+ "reason" = "oom"
+ "resource_class" = "other"
}
+ metric_name = "er.pods.failures"
+ namespace = "ER/Dev"
+ period = 300
+ stat = "Sum"
# (1 unchanged attribute hidden)
}
}
+ metric_query {
+ expression = "SUM([FILL(p0,0),FILL(p1,0),FILL(p2,0),FILL(p3,0)])"
+ id = "total"
+ return_data = true
# (2 unchanged attributes hidden)
}
}
# module.operations.aws_cloudwatch_metric_alarm.queue_depth will be created
+ resource "aws_cloudwatch_metric_alarm" "queue_depth" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "At least 100 jobs have waited for 15 minutes. Inspect dispatcher readiness, per-class concurrency, pod capacity and job backoff. Includes scheduled delays; confirm service rate before changing capacity."
+ alarm_name = "er-dev-queue-backlog"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ datapoints_to_alarm = 3
+ dimensions = {
+ "OTelLib" = "er-obs"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 3
+ id = (known after apply)
+ metric_name = "er.jobs.queue.total"
+ namespace = "ER/Dev"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 300
+ region = "us-east-2"
+ statistic = "Minimum"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 100
+ treat_missing_data = "notBreaching"
}
# module.operations.aws_cloudwatch_metric_alarm.snapshot_missing will be created
+ resource "aws_cloudwatch_metric_alarm" "snapshot_missing" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ alarm_description = "No successful queue/concurrency snapshots for three minutes. Check dispatcher process, database reads and the metric export pipeline; empty queue charts are not evidence of idle until this recovers."
+ alarm_name = "er-dev-operational-snapshot-missing"
+ arn = (known after apply)
+ comparison_operator = "LessThanThreshold"
+ datapoints_to_alarm = 3
+ dimensions = {
+ "OTelLib" = "er-obs"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 3
+ id = (known after apply)
+ metric_name = "er.ops.snapshots"
+ namespace = "ER/Dev"
+ ok_actions = [
+ "arn:aws:sns:us-east-2:797781631727:er-alerts",
]
+ period = 60
+ region = "us-east-2"
+ statistic = "Sum"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ threshold = 1
+ treat_missing_data = "breaching"
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["ci/isolation-probe-a"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-dev"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "ci"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-93ccc8f077814e800e7a"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["ci/isolation-probe-b"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-dev"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "ci"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-c6090ab88ffa4d30bb25"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_iam_role.tenant["ci/isolation-probe-a"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-dev"
+ "aws:RequestTag/kubernetes-namespace" = "ci"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-93ccc8f077814e800e7a"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-dev-runner-cdd932a93c2249b8a621"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role.tenant["ci/isolation-probe-b"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-dev"
+ "aws:RequestTag/kubernetes-namespace" = "ci"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-c6090ab88ffa4d30bb25"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-dev-runner-20ada9dc46d46007ab8d"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["ci/isolation-probe-a"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727/_isolation/probe-a/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-a/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-dev-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/0c226b8f-de72-4f5f-b50b-0cf1391bc325",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["ci/isolation-probe-b"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727/_isolation/probe-b/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-b/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-dev-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/0c226b8f-de72-4f5f-b50b-0cf1391bc325",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
Plan: 11 to add, 1 to change, 0 to destroy.
prod — 6 to add, 1 to changemodule.ses.data.aws_region.current: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.pod_trust: Reading...
module.network.data.aws_availability_zones.available: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
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.node_trust: Reading...
module.network.data.aws_region.current: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=3960055703]
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_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
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 0s [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=3634844169]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
# aws_iam_role_policy.er_runner_lake will be updated in-place
~ resource "aws_iam_role_policy" "er_runner_lake" {
id = "er-prod-runner-pod:er-prod-runner-lake"
name = "er-prod-runner-lake"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Action = [
- "s3:PutObject",
- "s3:ListMultipartUploadParts",
- "s3:GetObject",
- "s3:DeleteObject",
- "s3:AbortMultipartUpload",
] -> "s3:GetBucketLocation"
~ Resource = "arn:aws:s3:::er-prod-lake-797781631727/*" -> "arn:aws:s3:::er-prod-lake-797781631727"
~ Sid = "LakeObjects" -> "BucketLocationOnly"
# (1 unchanged attribute hidden)
},
- {
- Action = [
- "s3:ListBucketMultipartUploads",
- "s3:ListBucket",
- "s3:GetBucketLocation",
]
- Effect = "Allow"
- Resource = "arn:aws:s3:::er-prod-lake-797781631727"
- Sid = "LakeList"
},
- {
- Action = [
- "kms:GenerateDataKey*",
- "kms:Decrypt",
]
- Effect = "Allow"
- Resource = "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce"
- Sid = "LakeKey"
},
]
# (1 unchanged attribute hidden)
}
)
# (2 unchanged attributes hidden)
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["app/isolation-probe-a"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-prod"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "app"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-93ccc8f077814e800e7a"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["app/isolation-probe-b"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-prod"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "app"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-c6090ab88ffa4d30bb25"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_iam_role.tenant["app/isolation-probe-a"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-prod"
+ "aws:RequestTag/kubernetes-namespace" = "app"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-93ccc8f077814e800e7a"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-prod-runner-79b3a4bd146119bda02f"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role.tenant["app/isolation-probe-b"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-prod"
+ "aws:RequestTag/kubernetes-namespace" = "app"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-c6090ab88ffa4d30bb25"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-prod-runner-9ba07546e1359bb14800"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["app/isolation-probe-a"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727/_isolation/probe-a/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-a/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-prod-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["app/isolation-probe-b"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727/_isolation/probe-b/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-b/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-prod-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
Plan: 6 to add, 1 to change, 0 to destroy.
|
18 tasks done
athvin
marked this pull request as ready for review
November 9, 2026 11:05
This was referenced Nov 27, 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.
Closes #552
What
Add the shared dev/ci operations dashboard and SNS-backed backlog, missing-snapshot, OOM and eviction alarms. Supply bounded API RED, queue/concurrency, dispatch/task duration and retry/no-op instruments from committed control-plane state.
Why
The backend-design §14 signals lacked producers and actionable dashboards. Explicit zero snapshots distinguish idle from old gauge values; a heartbeat exposes failed reads or export. Only canonical deployments publish operational metrics, so isolated developer databases cannot overwrite the shared queue.
Proof
make checkandmake check-e2epassed one18f8e8d481e35501d3f04190955fd1088fa597f; all 15 required CI contexts pass on that head (Rust 42607875922, infra 42607875889). Terraform validates, alarm mock-provider tests and chart checks pass. Negative probes rejected the wrong backlog statistic, developer namespace publication, stale eviction replay and cumulative counter export. The house review covered instrumentation, declared SQL, execution tier and reuse; independently verified event-counting findings were fixed and retested.Risk & rollback
Counters can lose observations between commit and export; durable rows remain authoritative. The module adds CloudWatch series and alarms to the existing SNS topic. The missing-snapshot alarm may fire between Terraform apply and the first export from the new dispatcher. Prod module/collector wiring remains #944; cost attribution remains #667. Revert the commit to remove producers and Terraform-managed dashboard/alarms.
Post-merge ledger
Closed by: Codex · session
Codex:01a1be1b-0c92-7703-a4c2-25cb2c999baaonMac-26.lan· 2026-11-09T12:04:34Z — ledger reconciled with blocked items left empty.3c09bbc2bc1c781978cc205c871e35d70d88e2ea: Rust 42610044690, infra 42610044722 (all applies), frontend 42610044721, images 42610044701 and devcontainer 42610044786 succeeded. Watched through 2026-11-09T12:04:34Z without a new push-workflow failure. The separately dispatched dev runner acceptance probe remains blocked, recorded below/in feat(infra): isolate runner lake access by tenant (#550) #1027.images— run 42610044701 succeeded for merge3c09bbc2.deploy— descendant06bc5f0d31879af9c3007d814ffcb1acbbb9d5e7contains this merge (ancestry verified). Deploy 42639904666 cut prod to blue and dev to green. Independent CloudWatch Logs Insights readback founder-server listeningfrom prodapp.web-api-blue-59f8bbcbbb-vhd24.er-serverat 15:00:11.353Z (query1289ab65-8954-43c5-bc79-9524c430c81b) and devci.web-api-green-557958f6cb-csvzk.er-serverat 14:59:50.436Z (queryfd2d28bc-d3f6-4655-aecc-c985b1f65ca4), 2026-11-09.Specific to this change
er-readonlyCloudWatch queries on 2026-11-09 found realER/DevandER/Prodsamples (dimensionOTelLib=er-obs) forer.ops.snapshotsander.pods.snapshots, two samples/minute at 15:07–15:08Z, plus queue/pending oldest-age gauges at zero seconds. All seven operational alarms in both environments readOKduring the 15:12–15:13Z audit. The prior read-access limitation is resolved.er-alertsstill has a PendingConfirmation email subscription. Owner confirmation and receipt verification are tracked in Confirm the er-alerts email subscription and prove alert delivery #1056; alarm state alone does not prove delivery.Context — plan, discoveries, measurements, files
Plan
rust/crates/er-obs, registered with closed dimensions, and the producer calls iner-server. Read current queue/concurrency through declaredentities/aggregate statements; record task counters only after guarded writes commit. The query generator needed typed Postgres read projections: they reuse its binding/span path, retain E003 shape checks, and reject typed writes.make check,make check-e2e, and the relevant infra gates. Regenerate entity and skill artifacts rather than hand-editing them.land-pr, observe applied dashboards/alarms and live metric samples, and close the post-merge ledger with deployment dependencies and blocked read access explicitly recorded.Discoveries
The house review checked instrumentation, declared SQL, execution tier and reuse, with directory passes for the larger diff and independent finding verification. It found that successful relaunches retain old eviction reasons and could count them again; completion observations now count pod failures only for failed outcomes. It also exposed awsemf’s discarded initial cumulative sample: native SDK deltas preserve the first rare event without replaying lifetime counts after collector restart. A real HTTP/protobuf regression test checks counter and histogram temporality and gauge values; both the old cumulative setting and stale-reason emission were deliberately restored and observed failing before the corrected tests passed. Typed row-decoding errors also pass through the existing span outcome helper.
Pipeline semantics are supported by the pinned awsemf implementation and OpenObserve’s delta-metric ingestion guidance. These are compatibility evidence, not live account validation. The local command guard rejected read-only CloudWatch list-metrics and SNS subscription listing; those live checks remain unverified.
Developer namespaces have independent databases.
ER_OPERATIONAL_METRICSis enabled by the chart only for dev/ci and prod/app; developer and local processes keep their normal telemetry but cannot overwrite the shared operational gauges. Production dashboard installation still depends on #944.Implementation now includes closed-vocabulary API/status and task/class instruments, queue/concurrency snapshots with explicit zeros and a freshness heartbeat, and post-commit outcomes/retries/confirmed OOM/eviction counts. The dev dashboard uses means and interval counter rates; its backlog alarm reads a separate simultaneous total with Minimum over three five-minute periods. Prod operational module wiring remains dependent on existing #944; no prod coverage is claimed.
Focused checks so far: entity verification passes; the real Postgres queue/concurrency test passes; the in-memory meter test confirms emission, dimension bounds, and clearing stale queue values; dev Terraform validates.
make check, local e2e and full CI passed again after the independently verified review corrections.Before this change, the registry declared only database duration and span-export health metrics. The requested queue, concurrency, retry/outcome and API RED signals need producers before dashboards can be meaningful.
task_instancesalready persists resource class, timestamps, terminal reason, outcome and retry history; reuse it rather than introduce another operational state store.ER_PROFILE_*and span events in the older rollout checklist are obsolete; #552's revised issue scope is dashboards plus queue/eviction/OOM alerts, with cost attribution split to #667.Measurements
Files