forked from aws-observability/aws-otel-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs-ec2-sidecar.json
executable file
·118 lines (118 loc) · 2.8 KB
/
ecs-ec2-sidecar.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"family": "aws-otel-EC2",
"taskRoleArn": "{{ecsTaskRoleArn}}",
"executionRoleArn": "{{ecsTaskExecutionRoleArn}}",
"networkMode": "awsvpc",
"containerDefinitions": [
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/aws-otel-EC2",
"awslogs-region": "{{region}}",
"awslogs-stream-prefix": "ecs",
"awslogs-create-group": "True"
}
},
"portMappings": [
{
"hostPort": 2000,
"protocol": "udp",
"containerPort": 2000
},
{
"hostPort": 4317,
"protocol": "tcp",
"containerPort": 4317
},
{
"hostPort": 8125,
"protocol": "udp",
"containerPort": 8125
}
],
"command": [
{{command}}
],
"image": "amazon/aws-otel-collector",
"name": "aws-otel-collector"
},
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/aws-otel-EC2",
"awslogs-region": "{{region}}",
"awslogs-stream-prefix": "ecs",
"awslogs-create-group": "True"
}
},
"portMappings": [
{
"hostPort": 8000,
"protocol": "tcp",
"containerPort": 8000
}
],
"environment": [
{
"name": "AWS_XRAY_DAEMON_ADDRESS",
"value": "aws-otel-collector:2000"
}
],
"image": "611364707713.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-otel-goxray-sample-app:v0.0.1",
"essential": false,
"links": [
"aws-otel-collector"
],
"name": "aws-otel-emitter",
"dependsOn": [
{
"containerName": "aws-otel-collector",
"condition": "START"
}
]
},
{
"image": "nginx:latest",
"name": "nginx",
"essential": false,
"dependsOn": [
{
"containerName": "aws-otel-collector",
"condition": "START"
}
]
},
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "True",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "ecs",
"awslogs-group": "/ecs/statsd-emitter"
}
},
"image": "alpine/socat:latest",
"essential": false,
"name": "aoc-statsd-emitter",
"entryPoint": [
"/bin/sh",
"-c",
"while true; do echo 'statsdTestMetric:1|c' | socat -v -t 0 - UDP:127.0.0.1:8125; sleep 1; done"
],
"dependsOn": [
{
"containerName": "aws-otel-collector",
"condition": "START"
}
]
}
],
"memory": "2048",
"requiresCompatibilities": [
"EC2"
],
"cpu": "1024"
}