Skip to content

Commit 620f766

Browse files
[O11y][Apache Spark] Add metric type mapping for driver datastream (elastic#8110)
* add metric type mapping for driver datastream * update changelog.yml * update version * minor change in changelog.yml
1 parent a754869 commit 620f766

File tree

4 files changed

+172
-97
lines changed

4 files changed

+172
-97
lines changed

packages/apache_spark/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.7.3"
3+
changes:
4+
- description: Add metric_type mapping for driver datastream.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/8110
27
- version: "0.7.2"
38
changes:
49
- description: Added dimension mapping for driver datastream.

packages/apache_spark/data_stream/driver/fields/fields.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@
1010
dimension: true
1111
- name: job_duration
1212
type: long
13+
metric_type: gauge
1314
description: Duration of the job.
1415
- name: jobs
1516
type: group
1617
fields:
1718
- name: failed
1819
type: long
20+
metric_type: counter
1921
description: Number of failed jobs.
2022
- name: succeeded
2123
type: long
24+
metric_type: counter
2225
description: Number of successful jobs.
2326
- name: mbean
2427
type: keyword
@@ -30,81 +33,102 @@
3033
fields:
3134
- name: completed_count
3235
type: long
36+
metric_type: counter
3337
description: Total number of completed stages.
3438
- name: failed_count
3539
type: long
40+
metric_type: counter
3641
description: Total number of failed stages.
3742
- name: skipped_count
3843
type: long
44+
metric_type: counter
3945
description: Total number of skipped stages.
4046
- name: tasks
4147
type: group
4248
fields:
4349
- name: completed
4450
type: long
51+
metric_type: counter
4552
description: Number of completed tasks.
4653
- name: executors
4754
type: group
4855
fields:
4956
- name: black_listed
5057
type: long
58+
metric_type: counter
5159
description: Number of blacklisted executors for the tasks.
5260
- name: excluded
5361
type: long
62+
metric_type: counter
5463
description: Number of excluded executors for the tasks.
5564
- name: unblack_listed
5665
type: long
66+
metric_type: counter
5767
description: Number of unblacklisted executors for the tasks.
5868
- name: unexcluded
5969
type: long
70+
metric_type: counter
6071
description: Number of unexcluded executors for the tasks.
6172
- name: failed
6273
type: long
74+
metric_type: counter
6375
description: Number of failed tasks.
6476
- name: killed
6577
type: long
78+
metric_type: counter
6679
description: Number of killed tasks.
6780
- name: skipped
6881
type: long
82+
metric_type: counter
6983
description: Number of skipped tasks.
7084
- name: disk.space_used
7185
type: long
86+
metric_type: gauge
7287
description: Amount of the disk space utilized in MB.
7388
- name: memory
7489
type: group
7590
fields:
7691
- name: max_mem
7792
type: long
93+
metric_type: gauge
7894
description: Maximum amount of memory available for storage, in MB.
7995
- name: off_heap
8096
type: group
8197
fields:
8298
- name: max
8399
type: long
100+
metric_type: gauge
84101
description: Maximum amount of off heap memory available, in MB.
85102
- name: used
86103
type: long
104+
metric_type: gauge
87105
description: Total amount of off heap memory used, in MB.
88106
- name: remaining
89107
type: long
108+
metric_type: gauge
90109
description: Remaining amount of off heap memory, in MB.
91110
- name: on_heap
92111
type: group
93112
fields:
94113
- name: max
95114
type: long
115+
metric_type: gauge
96116
description: Maximum amount of on heap memory available, in MB.
97117
- name: used
98118
type: long
119+
metric_type: gauge
99120
description: Total amount of on heap memory used, in MB.
100121
- name: remaining
101122
type: long
123+
metric_type: gauge
102124
description: Remaining amount of on heap memory, in MB.
103125
- name: used
104126
type: long
127+
metric_type: gauge
105128
description: Total amount of memory used for storage, in MB.
106129
- name: remaining
107130
type: long
131+
metric_type: gauge
108132
description: Remaining amount of storage memory, in MB.
109133
- name: dag_scheduler
110134
type: group
@@ -114,51 +138,65 @@
114138
fields:
115139
- name: active
116140
type: long
141+
metric_type: gauge
117142
description: Number of active jobs.
118143
- name: all
119144
type: long
145+
metric_type: gauge
120146
description: Total number of jobs.
121147
- name: stages
122148
type: group
123149
fields:
124150
- name: failed
125151
type: long
152+
metric_type: gauge
126153
description: Number of failed stages.
127154
- name: running
128155
type: long
156+
metric_type: gauge
129157
description: Number of running stages.
130158
- name: waiting
131159
type: long
160+
metric_type: gauge
132161
description: Number of waiting stages
133162
- name: executors
134163
type: group
135164
fields:
136165
- name: all
137166
type: long
167+
metric_type: gauge
138168
description: Total number of executors.
139169
- name: decommission_unfinished
140170
type: long
171+
metric_type: counter
141172
description: Total number of decommissioned unfinished executors.
142173
- name: exited_unexpectedly
143174
type: long
175+
metric_type: counter
144176
description: Total number of executors exited unexpectedly.
145177
- name: gracefully_decommissioned
146178
type: long
179+
metric_type: counter
147180
description: Total number of executors gracefully decommissioned.
148181
- name: killed_by_driver
149182
type: long
183+
metric_type: counter
150184
description: Total number of executors killed by driver.
151185
- name: pending_to_remove
152186
type: long
187+
metric_type: gauge
153188
description: Total number of executors pending to be removed.
154189
- name: to_add
155190
type: long
191+
metric_type: gauge
156192
description: Total number of executors to be added.
157193
- name: max_needed
158194
type: long
195+
metric_type: gauge
159196
description: Maximum number of executors needed.
160197
- name: target
161198
type: long
199+
metric_type: gauge
162200
description: Total number of target executors.
163201
- name: executor_metrics
164202
type: group
@@ -168,18 +206,22 @@
168206
fields:
169207
- name: direct_pool
170208
type: long
209+
metric_type: gauge
171210
description: Peak memory that the JVM is using for direct buffer pool.
172211
- name: jvm
173212
type: group
174213
fields:
175214
- name: heap
176215
type: long
216+
metric_type: counter
177217
description: Peak memory usage of the heap that is used for object allocation.
178218
- name: off_heap
179219
type: long
220+
metric_type: counter
180221
description: Peak memory usage of non-heap memory that is used by the Java virtual machine.
181222
- name: mapped_pool
182223
type: long
224+
metric_type: gauge
183225
description: Peak memory that the JVM is using for mapped buffer pool
184226
- name: gc
185227
type: group
@@ -189,18 +231,22 @@
189231
fields:
190232
- name: count
191233
type: long
234+
metric_type: gauge
192235
description: Total major GC count. For example, the garbage collector is one of MarkSweepCompact, PS MarkSweep, ConcurrentMarkSweep, G1 Old Generation and so on.
193236
- name: time
194237
type: long
238+
metric_type: gauge
195239
description: Elapsed total major GC time. The value is expressed in milliseconds.
196240
- name: minor
197241
type: group
198242
fields:
199243
- name: count
200244
type: long
245+
metric_type: gauge
201246
description: Total minor GC count. For example, the garbage collector is one of Copy, PS Scavenge, ParNew, G1 Young Generation and so on.
202247
- name: time
203248
type: long
249+
metric_type: gauge
204250
description: Elapsed total minor GC time. The value is expressed in milliseconds.
205251
- name: heap_memory
206252
type: group
@@ -210,24 +256,30 @@
210256
fields:
211257
- name: execution
212258
type: long
259+
metric_type: gauge
213260
description: Peak off heap execution memory in use, in bytes.
214261
- name: storage
215262
type: long
263+
metric_type: gauge
216264
description: Peak off heap storage memory in use, in bytes.
217265
- name: unified
218266
type: long
267+
metric_type: gauge
219268
description: Peak off heap memory (execution and storage).
220269
- name: 'on'
221270
type: group
222271
fields:
223272
- name: execution
224273
type: long
274+
metric_type: gauge
225275
description: Peak on heap execution memory in use, in bytes.
226276
- name: storage
227277
type: long
278+
metric_type: gauge
228279
description: Peak on heap storage memory in use, in bytes.
229280
- name: unified
230281
type: long
282+
metric_type: gauge
231283
description: Peak on heap memory (execution and storage).
232284
- name: process_tree
233285
type: group
@@ -237,44 +289,56 @@
237289
fields:
238290
- name: rss_memory
239291
type: long
292+
metric_type: gauge
240293
description: 'Resident Set Size: number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out.'
241294
- name: v_memory
242295
type: long
296+
metric_type: gauge
243297
description: Virtual memory size in bytes.
244298
- name: other
245299
type: group
246300
fields:
247301
- name: rss_memory
248302
type: long
303+
metric_type: gauge
249304
- name: v_memory
250305
type: long
306+
metric_type: gauge
251307
- name: python
252308
type: group
253309
fields:
254310
- name: rss_memory
255311
type: long
312+
metric_type: gauge
256313
- name: v_memory
257314
type: long
315+
metric_type: gauge
258316
- name: hive_external_catalog
259317
type: group
260318
fields:
261319
- name: file_cache_hits
262320
type: long
321+
metric_type: counter
263322
description: Total number of file cache hits.
264323
- name: files_discovered
265324
type: long
325+
metric_type: counter
266326
description: Total number of files discovered.
267327
- name: hive_client_calls
268328
type: long
329+
metric_type: counter
269330
description: Total number of Hive Client calls.
270331
- name: parallel_listing_job.count
271332
type: long
333+
metric_type: counter
272334
description: Number of jobs running parallely.
273335
- name: partitions_fetched
274336
type: long
337+
metric_type: counter
275338
description: Number of partitions fetched.
276339
- name: jvm.cpu.time
277340
type: long
341+
metric_type: gauge
278342
description: Elapsed CPU time the JVM spent.
279343
- name: spark.streaming
280344
type: group
@@ -284,17 +348,23 @@
284348
fields:
285349
- name: rows.total
286350
type: long
351+
metric_type: gauge
287352
description: Total number of rows.
288353
- name: used_bytes
289354
type: long
355+
metric_type: gauge
290356
description: Total number of bytes utilized.
291357
- name: processing_rate.total
292358
type: double
359+
metric_type: gauge
293360
description: Total rate of processing.
294361
- name: latency
295362
type: long
363+
metric_type: gauge
296364
- name: event_time.watermark
297365
type: long
366+
metric_type: gauge
298367
- name: input_rate.total
299368
type: double
369+
metric_type: gauge
300370
description: Total rate of the input.

0 commit comments

Comments
 (0)