-
Notifications
You must be signed in to change notification settings - Fork 239
/
otel-task-metrics-config.yaml
219 lines (213 loc) · 6.08 KB
/
otel-task-metrics-config.yaml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
extensions:
health_check:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
awsxray:
endpoint: 0.0.0.0:2000
transport: udp
statsd:
endpoint: 0.0.0.0:8125
aggregation_interval: 60s
awsecscontainermetrics:
processors:
batch/traces:
timeout: 1s
send_batch_size: 50
batch/metrics:
timeout: 60s
filter:
metrics:
include:
match_type: strict
metric_names:
- ecs.task.memory.reserved
- ecs.task.memory.utilized
- ecs.task.cpu.reserved
- ecs.task.cpu.utilized
- ecs.task.network.rate.rx
- ecs.task.network.rate.tx
- ecs.task.storage.read_bytes
- ecs.task.storage.write_bytes
- container.duration
metricstransform:
transforms:
- include: ecs.task.memory.utilized
action: update
new_name: MemoryUtilized
- include: ecs.task.memory.reserved
action: update
new_name: MemoryReserved
- include: ecs.task.cpu.utilized
action: update
new_name: CpuUtilized
- include: ecs.task.cpu.reserved
action: update
new_name: CpuReserved
- include: ecs.task.network.rate.rx
action: update
new_name: NetworkRxBytes
- include: ecs.task.network.rate.tx
action: update
new_name: NetworkTxBytes
- include: ecs.task.storage.read_bytes
action: update
new_name: StorageReadBytes
- include: ecs.task.storage.write_bytes
action: update
new_name: StorageWriteBytes
resource:
attributes:
- key: ClusterName
from_attribute: aws.ecs.cluster.name
action: insert
- key: aws.ecs.cluster.name
action: delete
- key: ServiceName
from_attribute: aws.ecs.service.name
action: insert
- key: aws.ecs.service.name
action: delete
- key: TaskId
from_attribute: aws.ecs.task.id
action: insert
- key: aws.ecs.task.id
action: delete
- key: TaskDefinitionFamily
from_attribute: aws.ecs.task.family
action: insert
- key: aws.ecs.task.family
action: delete
- key: TaskARN
from_attribute: aws.ecs.task.arn
action: insert
- key: aws.ecs.task.arn
action: delete
- key: DockerName
from_attribute: aws.ecs.docker.name
action: insert
- key: aws.ecs.docker.name
action: delete
- key: TaskDefinitionRevision
from_attribute: aws.ecs.task.version
action: insert
- key: aws.ecs.task.version
action: delete
- key: PullStartedAt
from_attribute: aws.ecs.task.pull_started_at
action: insert
- key: aws.ecs.task.pull_started_at
action: delete
- key: PullStoppedAt
from_attribute: aws.ecs.task.pull_stopped_at
action: insert
- key: aws.ecs.task.pull_stopped_at
action: delete
- key: AvailabilityZone
from_attribute: cloud.zone
action: insert
- key: cloud.zone
action: delete
- key: LaunchType
from_attribute: aws.ecs.task.launch_type
action: insert
- key: aws.ecs.task.launch_type
action: delete
- key: Region
from_attribute: cloud.region
action: insert
- key: cloud.region
action: delete
- key: AccountId
from_attribute: cloud.account.id
action: insert
- key: cloud.account.id
action: delete
- key: DockerId
from_attribute: container.id
action: insert
- key: container.id
action: delete
- key: ContainerName
from_attribute: container.name
action: insert
- key: container.name
action: delete
- key: Image
from_attribute: container.image.name
action: insert
- key: container.image.name
action: delete
- key: ImageId
from_attribute: aws.ecs.container.image.id
action: insert
- key: aws.ecs.container.image.id
action: delete
- key: ExitCode
from_attribute: aws.ecs.container.exit_code
action: insert
- key: aws.ecs.container.exit_code
action: delete
- key: CreatedAt
from_attribute: aws.ecs.container.created_at
action: insert
- key: aws.ecs.container.created_at
action: delete
- key: StartedAt
from_attribute: aws.ecs.container.started_at
action: insert
- key: aws.ecs.container.started_at
action: delete
- key: FinishedAt
from_attribute: aws.ecs.container.finished_at
action: insert
- key: aws.ecs.container.finished_at
action: delete
- key: ImageTag
from_attribute: container.image.tag
action: insert
- key: container.image.tag
action: delete
exporters:
awsxray:
awsemf/application:
namespace: ECS/AWSOTel/Application
log_group_name: '/aws/ecs/application/metrics'
awsemf/performance:
namespace: ECS/ContainerInsights
log_group_name: '/aws/ecs/containerinsights/{ClusterName}/performance'
log_stream_name: '{TaskId}'
resource_to_telemetry_conversion:
enabled: true
dimension_rollup_option: NoDimensionRollup
metric_declarations:
- dimensions: [ [ ClusterName ], [ ClusterName, TaskDefinitionFamily ] ]
metric_name_selectors:
- MemoryUtilized
- MemoryReserved
- CpuUtilized
- CpuReserved
- NetworkRxBytes
- NetworkTxBytes
- StorageReadBytes
- StorageWriteBytes
- metric_name_selectors: [container.*]
service:
pipelines:
traces:
receivers: [otlp,awsxray]
processors: [batch/traces]
exporters: [awsxray]
metrics/application:
receivers: [otlp, statsd]
processors: [batch/metrics]
exporters: [awsemf/application]
metrics/performance:
receivers: [awsecscontainermetrics ]
processors: [filter, metricstransform, resource]
exporters: [ awsemf/performance ]
extensions: [health_check]