From 23da25b30a0bcf6da188aef056db56cca9705ff0 Mon Sep 17 00:00:00 2001 From: Shaun Remekie Date: Tue, 8 Oct 2024 18:53:43 +0200 Subject: [PATCH] fix: cds-1580 fix Otel ECS-EC2 configuration (#182) * fixed cdot entry command * added pprof and removed deprecated logging exporter * changelog * removed latest tag from example --- CHANGELOG.md | 10 ++++++++++ examples/ecs-ec2/ecs-ec2.tf | 2 +- modules/ecs-ec2/main.tf | 1 + modules/ecs-ec2/otel_config.tftpl.yaml | 4 +++- modules/ecs-ec2/otel_config_metrics.tftpl.yaml | 5 ++++- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9025915..0b3682e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v2.0.1 +### 🧰 Bug fixes 🧰 +- Fixed ecs-ec2 module, adjusted cdot image command to `--config env:OTEL_CONFIG` +- Removed latest flag from ecs-ec2 module example. +- Removed deprecated logging exporter from ecs-ec2 module otel configs. + +### 💡 Enhancements +- Added pprof extension to default ecs-ec2 otel configurations. + + ## v2.0.0 ### 🛑 Breaking changes 🛑 - Remove deprecated modules: cloudwatch-logs, S3 and kinesis diff --git a/examples/ecs-ec2/ecs-ec2.tf b/examples/ecs-ec2/ecs-ec2.tf index 2b040bcc..34b15385 100644 --- a/examples/ecs-ec2/ecs-ec2.tf +++ b/examples/ecs-ec2/ecs-ec2.tf @@ -4,7 +4,7 @@ provider "aws" { module "otel_ecs_ec2_coralogix" { source = "coralogix/aws/coralogix//modules/ecs-ec2" ecs_cluster_name = "test-lab-cluster" - image_version = "latest" + image_version = "v0.3.1" memory = 256 coralogix_region = "EU1" custom_domain = null diff --git a/modules/ecs-ec2/main.tf b/modules/ecs-ec2/main.tf index 025605de..11672d0a 100644 --- a/modules/ecs-ec2/main.tf +++ b/modules/ecs-ec2/main.tf @@ -105,6 +105,7 @@ resource "aws_ecs_task_definition" "coralogix_otel_agent" { value : local.otel_config } ], + command: ["--config", "env:OTEL_CONFIG"], healthCheck : { command : ["CMD-SHELL", "nc -vz localhost 13133 || exit 1"] startPeriod : 30 diff --git a/modules/ecs-ec2/otel_config.tftpl.yaml b/modules/ecs-ec2/otel_config.tftpl.yaml index 70da59b8..61ee60ff 100644 --- a/modules/ecs-ec2/otel_config.tftpl.yaml +++ b/modules/ecs-ec2/otel_config.tftpl.yaml @@ -96,15 +96,17 @@ exporters: - "aws.ecs.docker.name" - "docker.name" timeout: 30s - logging: + debug: verbosity: detailed extensions: health_check: + pprof: service: extensions: - health_check + - pprof telemetry: logs: level: warn diff --git a/modules/ecs-ec2/otel_config_metrics.tftpl.yaml b/modules/ecs-ec2/otel_config_metrics.tftpl.yaml index cfb0826c..03d6498e 100644 --- a/modules/ecs-ec2/otel_config_metrics.tftpl.yaml +++ b/modules/ecs-ec2/otel_config_metrics.tftpl.yaml @@ -83,7 +83,8 @@ processors: override: false exporters: - logging: + debug: + verbosity: detailed coralogix: domain: "$CORALOGIX_DOMAIN" private_key: "$PRIVATE_KEY" @@ -101,10 +102,12 @@ exporters: extensions: health_check: + pprof: service: extensions: - health_check + - pprof telemetry: logs: level: warn