Skip to content

Commit

Permalink
chore: Datadog 환경변수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jihwan2da committed Oct 17, 2023
1 parent 181ef81 commit a883db8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
40 changes: 34 additions & 6 deletions .aws/task-definition.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"taskDefinitionArn": "arn:aws:ecs:ap-northeast-2:750773866215:task-definition/gloddy-prd-spring-task-test:18",
"taskDefinitionArn": "arn:aws:ecs:ap-northeast-2:750773866215:task-definition/gloddy-prd-spring-task-test:24",
"containerDefinitions": [
{
"name": "springboot",
Expand Down Expand Up @@ -39,32 +39,60 @@
{
"name": "datadog-agent",
"image": "public.ecr.aws/datadog/agent:latest",
"cpu": 203,
"cpu": 198,
"memory": 512,
"portMappings": [
{
"name": "datadog-agent-8126-tcp",
"containerPort": 8126,
"hostPort": 8126,
"protocol": "tcp"
},
{
"containerPort": 8125,
"hostPort": 8125,
"protocol": "udp"
}
],
"essential": false,
"environment": [],
"environment": [
{
"name": "DD_SITE",
"value": "us5.datadoghq.com"
},
{
"name": "DD_APM_ENABLED",
"value": "true"
},
{
"name": "DD_DOGSTATSD_NON_LOCAL_TRAFFIC",
"value": "true"
}
],
"environmentFiles": [
{
"value": "arn:aws:s3:::gloddy-env/env/datadog.env",
"type": "s3"
}
],
"mountPoints": [],
"volumesFrom": []
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/datadog-agent",
"awslogs-region": "ap-northeast-2",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
}
}
],
"family": "gloddy-prd-spring-task-test",
"executionRoleArn": "arn:aws:iam::750773866215:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"revision": 18,
"revision": 24,
"volumes": [],
"status": "ACTIVE",
"requiresAttributes": [
Expand Down Expand Up @@ -110,7 +138,7 @@
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"registeredAt": "2023-10-16T07:41:48.083Z",
"registeredAt": "2023-10-17T08:45:15.389Z",
"registeredBy": "arn:aws:iam::750773866215:root",
"tags": []
}
4 changes: 2 additions & 2 deletions Dockerfile_prd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ COPY ${JAR_FILE_PATH} app.jar
RUN apt-get update \
&& apt-get install -y wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget -O dd-java-agent.jar https://dtdg.co/latest-java-tracer
RUN wget -O dd-java-agent.jar 'https://dtdg.co/latest-java-tracer'

ENTRYPOINT ["java", "-javaagent:dd-java-agent.jar", "-XX:FlightRecorderOptions=stackdepth=256", "-Ddd.appsec.enabled=true", "-Ddd.iast.enabled=true", "-Ddd.logs.injection=true", "-Ddd.service=gloddy", "-Ddd.env=production", "-jar", "app.jar"]
ENTRYPOINT ["java", "-javaagent:dd-java-agent.jar", "Ddd.profiling.enabled=true","-XX:FlightRecorderOptions=stackdepth=256", "-Ddd.appsec.enabled=true", "-Ddd.iast.enabled=true", "-Ddd.logs.injection=true", "-Ddd.jmxfetch.enabled=true", "-Ddd.service=gloddy", "-Ddd.env=production", "-jar", "app.jar"]

0 comments on commit a883db8

Please sign in to comment.