From f37489af52e406c0da8cfd4ccb21e3b1e880ec83 Mon Sep 17 00:00:00 2001 From: sreevalsanmr Date: Tue, 24 Sep 2024 21:18:51 +0530 Subject: [PATCH] update coralogix config for taskdef template --- .../taskdef_template/taskdef_template.json | 72 ++++++++++++------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/Support/taskdef_template/taskdef_template.json b/Support/taskdef_template/taskdef_template.json index 7f2e97e..ce2c670 100644 --- a/Support/taskdef_template/taskdef_template.json +++ b/Support/taskdef_template/taskdef_template.json @@ -10,19 +10,8 @@ "logConfiguration": { "logDriver": "awsfirelens", "options": { - "Name": "datadog", - "Host": "http-intake.logs.datadoghq.com", - "dd_service": "$app_name", - "dd_source": "nodejs", - "TLS": "on", - "provider": "ecs" - }, - "secretOptions": [ - { - "name": "apiKey", - "valueFrom": "arn:aws:ssm:$region:$account_number:parameter/DATADOG_APIKEY" - } - ] + "Name": "OpenTelemetry" + } }, "entryPoint": null, "portMappings": [ @@ -76,25 +65,60 @@ } }, { - "essential": true, - "image": "amazon/aws-for-fluent-bit:stable", - "name": "log_router", + "essential": false, + "name": "otel-collector", + "image": "otel/opentelemetry-collector-contrib", "firelensConfiguration": { "type": "fluentbit", - "options": { - "enable-ecs-log-metadata": "true" - } + "options": {} }, - "environment": null, - "secrets": null, + "portMappings": [ + { + "name": "otel-collector-4317-tcp", + "containerPort": 4317, + "hostPort": 4317, + "protocol": "tcp", + "appProtocol": "grpc" + }, + { + "name": "otel-collector-4318-tcp", + "containerPort": 4318, + "hostPort": 4318, + "protocol": "tcp", + "appProtocol": "grpc" + } + ], + "command": [ + "--config", + "env:SSM_CONFIG" + ], + "environment": [ + { + "name": "CORALOGIX_DOMAIN", + "value": "eu2.coralogix.com" + }, + { + "name": "APP_NAME", + "value": "$app_name" + } + ], + "secrets": [ + { + "name": "SSM_CONFIG", + "valueFrom": "arn:aws:ssm:$region:$account_number:parameter/CORALOGIX/CX_OTEL/config.yaml" + }, + { + "name": "PRIVATE_KEY", + "valueFrom": "arn:aws:ssm:$region:$account_number:parameter/CORALOGIX/PRIVATE_KEY" + } + ], + "user": "0", "memoryReservation": 50, "resourceRequirements": null, - "portMappings": [], "environmentFiles": [], "mountPoints": null, "volumesFrom": null, "hostname": null, - "user": null, "workingDirectory": null, "extraHosts": null, "logConfiguration": null, @@ -146,4 +170,4 @@ "value": "$app_name-taskdefinition" } ] -} \ No newline at end of file +}