From 3ff1756977c26908a36b4d2af2b1abee60c0fdcb Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 8 Oct 2024 12:22:36 +0200 Subject: [PATCH 1/6] bump otel collector resources --- terraform/ecs/cluster.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index 9d741c8..0ea8604 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -7,8 +7,8 @@ locals { task_memory = module.this.stage == "prod" ? var.task_memory : 512 otel_port = var.port + 1 - otel_cpu = 128 - otel_memory = 128 + otel_cpu = 256 + otel_memory = 256 } module "ecs_cpu_mem" { From b696f947957a61604a523ddf479593ef0d700406 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 8 Oct 2024 21:50:48 +0200 Subject: [PATCH 2/6] pin and trivialize otel --- terraform/ecs/cluster.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index 0ea8604..5657d95 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -114,10 +114,11 @@ resource "aws_ecs_task_definition" "app_task" { { name = "aws-otel-collector", - image = "public.ecr.aws/aws-observability/aws-otel-collector:latest", + image_tag = "v0.3.0" + image = "public.ecr.aws/aws-observability/aws-otel-collector:${image_tag}", cpu = local.otel_cpu, memory = local.otel_memory, - essential = true, + essential = false, command = [ "--config=/etc/ecs/ecs-amp-prometheus.yaml", From dd34acf5f6a1187c6b545b29c5c3a31f94121233 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 8 Oct 2024 21:55:32 +0200 Subject: [PATCH 3/6] pin and trivialize otel --- terraform/ecs/cluster.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index 5657d95..555b3aa 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -6,6 +6,7 @@ locals { task_cpu = module.this.stage == "prod" ? var.task_cpu : 256 task_memory = module.this.stage == "prod" ? var.task_memory : 512 + otel_image_tag = "v0.3.0" otel_port = var.port + 1 otel_cpu = 256 otel_memory = 256 @@ -114,8 +115,7 @@ resource "aws_ecs_task_definition" "app_task" { { name = "aws-otel-collector", - image_tag = "v0.3.0" - image = "public.ecr.aws/aws-observability/aws-otel-collector:${image_tag}", + image = "public.ecr.aws/aws-observability/aws-otel-collector:${local.otel_image_tag}", cpu = local.otel_cpu, memory = local.otel_memory, essential = false, From c02a58e6dbb67aacf18d495349f07ef3c6c64518 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 9 Oct 2024 09:56:51 +0200 Subject: [PATCH 4/6] descale otel resources --- terraform/ecs/cluster.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index 555b3aa..d8b69e3 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -8,8 +8,8 @@ locals { otel_image_tag = "v0.3.0" otel_port = var.port + 1 - otel_cpu = 256 - otel_memory = 256 + otel_cpu = 128 + otel_memory = 128 } module "ecs_cpu_mem" { From 9881620db7f4b91d41045b0b36024d623aca58f4 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 9 Oct 2024 10:10:14 +0200 Subject: [PATCH 5/6] make otel essential again --- terraform/ecs/cluster.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index d8b69e3..4128177 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -118,7 +118,7 @@ resource "aws_ecs_task_definition" "app_task" { image = "public.ecr.aws/aws-observability/aws-otel-collector:${local.otel_image_tag}", cpu = local.otel_cpu, memory = local.otel_memory, - essential = false, + essential = true, command = [ "--config=/etc/ecs/ecs-amp-prometheus.yaml", From ee842af2bf27d17b6e4232e8a9e87e5c9f89a21c Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 9 Oct 2024 10:35:29 +0200 Subject: [PATCH 6/6] fmt HCL --- terraform/ecs/cluster.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/ecs/cluster.tf b/terraform/ecs/cluster.tf index 4128177..dad48e0 100644 --- a/terraform/ecs/cluster.tf +++ b/terraform/ecs/cluster.tf @@ -7,9 +7,9 @@ locals { task_memory = module.this.stage == "prod" ? var.task_memory : 512 otel_image_tag = "v0.3.0" - otel_port = var.port + 1 - otel_cpu = 128 - otel_memory = 128 + otel_port = var.port + 1 + otel_cpu = 128 + otel_memory = 128 } module "ecs_cpu_mem" {