Repository navigation
Expand file tree
/
Copy pathtag-conventions-java.yaml
More file actions
404 lines (370 loc) · 21.6 KB
/
Copy pathtag-conventions-java.yaml
File metadata and controls
404 lines (370 loc) · 21.6 KB
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# Tracer overlay for tag-conventions.yaml — dd-trace-java's own span types and set-path routing.
# ---------------------------------------------------------------------------
# tag-conventions.yaml is language-agnostic. What only this tracer has lives here: span types for Java
# technologies, and which keys it intercepts on the set-path (routing them to a span field or a
# sampling directive instead of tag storage).
#
# span_types — span types only this tracer has, each extending a shared one with tags only this
# tracer sets (servlet's request extends http.server). Their tags get slots like any other.
# mixins — this tracer's cross-cutting tags, pushed onto span types with `applies` (databricks).
# tags — keys that exist only to be routed, so the conventions do not declare them. They get
# ids like any other tag (instrumentation can set them by id) but belong to no span type.
# Each is intercepted, so it is not listed again below. Same declaration syntax as
# tag-conventions.yaml; refs are not allowed.
# intercepted — tags declared in tag-conventions.yaml that TagInterceptor also routes. Each one's id carries
# the INTERCEPTED bit, so a setter called with a constant id folds the interception test
# away. TagInterceptor's switch is the authority on what each one does; a test there
# keeps this list and the switch in agreement.
# java_names — KnownTags constant bases that replace a tag's sanitized name. Each tag's constants are
# its name upper-cased with every other character as '_' (the id, bare), and that plus
# _NAME, _SERIAL_NUM and so on, so two names that differ only in punctuation
# (aws.service, aws_service) would generate the same constants, as would a tag x.name
# (id X_NAME) and a tag x (name X_NAME). Generation fails on such a clash until one is
# renamed here.
# ---------------------------------------------------------------------------
span_types:
# Servlet requests: http.server spans from a Servlet container, with its context and path.
servlet.request:
extends: http.server
tags:
- { dd-name: servlet.context, type: string, required: optional }
- { dd-name: servlet.path, type: string, required: optional }
- { dd-name: user.principal, type: string, required: optional } # the authenticated principal's name
- { dd-name: timeout, type: long, required: optional } # Servlet 3 async timeout, when it fires
# Spring Web MVC view rendering: the rendered view's class.
spring.view.render:
extends: view.render
tags:
- { dd-name: view.type, type: string, required: optional }
# Spring WebFlux handlers: the handler's class, and a functional route's predicate.
spring.webflux.handler:
extends: web.handler
tags:
- { dd-name: handler.type, type: string, required: optional }
- { dd-name: request.predicate, type: string, required: optional }
# Spring WebFlux's HTTP client: why a request was cancelled.
spring.webflux.client:
extends: http.client
tags:
- { dd-name: message, type: string, required: optional }
- { dd-name: event, type: string, required: optional } # "cancelled"
# TIBCO BusinessWorks process and activity spans: the app node and version.
tibco.process:
extends: internal
tags:
- { dd-name: tibco.node, type: string, required: optional }
- { dd-name: tibco.version, type: string, required: optional }
# Mule action spans: the correlation id, and the location when Mule supplies one.
mule.action:
extends: internal
tags:
- { dd-name: mule.correlation_id, type: string, required: recommended }
- { dd-name: mule.location, type: string, required: optional }
# Elasticsearch REST client requests.
elasticsearch.rest:
extends: db.client
tags:
- { ref: http.method }
- { ref: http.url } # the endpoint path
- { dd-name: elasticsearch.body, type: string, required: optional } # off by default
- { dd-name: elasticsearch.params, type: string, required: optional }
# Elasticsearch transport client actions.
elasticsearch.transport:
extends: db.client
tags:
- { dd-name: elasticsearch.action, type: string, required: recommended }
- { dd-name: elasticsearch.request, type: string, required: recommended }
- { dd-name: elasticsearch.request.indices, type: string, required: optional }
- { dd-name: elasticsearch.request.search.types, type: string, required: optional }
- { dd-name: elasticsearch.request.write.type, type: string, required: optional }
- { dd-name: elasticsearch.request.write.routing, type: string, required: optional }
- { dd-name: elasticsearch.request.write.version, type: long, required: optional }
- { dd-name: elasticsearch.type, type: string, required: optional }
- { dd-name: elasticsearch.id, type: string, required: optional }
- { dd-name: elasticsearch.version, type: long, required: optional }
- { dd-name: elasticsearch.shard.broadcast.total, type: int, required: optional }
- { dd-name: elasticsearch.shard.broadcast.successful, type: int, required: optional }
- { dd-name: elasticsearch.shard.broadcast.failed, type: int, required: optional }
- { dd-name: elasticsearch.shard.replication.total, type: int, required: optional }
- { dd-name: elasticsearch.shard.replication.successful, type: int, required: optional }
- { dd-name: elasticsearch.shard.replication.failed, type: int, required: optional }
- { dd-name: elasticsearch.response.status, type: int, required: optional }
- { dd-name: elasticsearch.shard.bulk.id, type: int, required: optional }
- { dd-name: elasticsearch.shard.bulk.index, type: string, required: optional }
- { dd-name: elasticsearch.node.failures, type: int, required: optional }
- { dd-name: elasticsearch.node.cluster.name, type: string, required: optional }
# Twilio SDK calls: client spans typed http, though they set no HTTP tags.
twilio.sdk:
extends: http.client
tags:
- { dd-name: twilio.type, type: string, required: recommended }
- { dd-name: twilio.account, type: string, required: optional }
- { dd-name: twilio.sid, type: string, required: optional }
- { dd-name: twilio.status, type: string, required: optional }
- { dd-name: twilio.parentSid, type: string, required: optional } # calls only
# JSP compilation and rendering (span.kind unset at runtime).
jsp.compile:
extends: internal
tags:
- { ref: servlet.context }
- { dd-name: jsp.compiler, type: string, required: optional }
- { dd-name: jsp.classFQCN, type: string, required: recommended }
jsp.render:
extends: view.render
tags:
- { ref: servlet.context }
- { dd-name: jsp.forwardOrigin, type: string, required: optional }
- { dd-name: jsp.requestURL, type: string, required: optional }
# Quartz scheduled job executions (span.kind unset at runtime).
quartz.job:
extends: internal
tags:
- { dd-name: quartz.job.name, type: string, required: optional }
- { dd-name: quartz.job.group, type: string, required: optional }
- { dd-name: quartz.trigger.name, type: string, required: optional }
- { dd-name: quartz.trigger.group, type: string, required: optional }
# Hystrix commands, when Hystrix tags are enabled (span.kind unset at runtime).
hystrix.command:
extends: internal
tags:
- { dd-name: hystrix.command, type: string, required: optional }
- { dd-name: hystrix.group, type: string, required: optional }
- { dd-name: hystrix.circuit-open, type: boolean, required: optional }
# Gradle and Maven specifics on CI Visibility's session and module spans.
test.gradle.session:
extends: test.session
tags:
- { dd-name: test.gradle.nested_build, type: boolean, required: optional }
- { dd-name: test.is_android, type: boolean, required: optional }
test.gradle.module:
extends: test.module
tags:
- { ref: test.is_android }
test.maven.module:
extends: test.module
tags:
- { dd-name: test.execution, type: string, required: recommended } # artifactId:goal:executionId
# An Android test run under Robolectric.
test.android:
extends: test
tags:
- { dd-name: test.android.api_level, type: int, required: optional }
- { dd-name: test.android.release, type: string, required: optional }
- { dd-name: test.android.codename, type: string, required: optional }
- { dd-name: test.android.robolectric.version, type: string, required: optional }
# A JUnit 5 test, which may be a dynamic test.
test.junit5:
extends: test
tags:
- { dd-name: test.junit5.is_dynamic, type: boolean, required: optional }
# JUnit's before and after callbacks (span.kind unset).
junit.callback:
extends: internal
tags:
- { dd-name: test.callback, type: string, required: recommended } # Before, AfterAll, ...
# Data Jobs Monitoring: Spark spans emitted by the Java tracer (span.kind unset at runtime), so
# their definitions live here. Not modeled: name patterns (the config.* job parameters,
# spark.source.N.* and spark.state.N.* streaming progress, runtime tags copied from job properties)
# can't have ids.
#
# The driver's spans form application > [sql] > job > stage > task; on Databricks a job, or a
# streaming batch, is the top-level span instead of an application. Executor task spans come from
# the executor's own instrumentation.
spark:
abstract: true
extends: internal
tags:
- { dd-name: app_id, type: string, required: recommended }
- { dd-name: service_name, type: string, required: optional } # when the Spark app name is the service
# Spark spans reporting task metrics: one task on an executor, or the sum over a driver span's tasks.
spark.task_metrics:
abstract: true
extends: spark
tags:
- { dd-name: spark.executor_deserialize_time, type: long, required: optional }
- { dd-name: spark.executor_deserialize_cpu_time, type: long, required: optional }
- { dd-name: spark.executor_run_time, type: long, required: optional }
- { dd-name: spark.executor_cpu_time, type: long, required: optional }
- { dd-name: spark.result_size, type: long, required: optional }
- { dd-name: spark.jvm_gc_time, type: long, required: optional }
- { dd-name: spark.result_serialization_time, type: long, required: optional }
- { dd-name: spark.memory_bytes_spilled, type: long, required: optional }
- { dd-name: spark.disk_bytes_spilled, type: long, required: optional }
- { dd-name: spark.peak_execution_memory, type: long, required: optional }
- { dd-name: spark.input_bytes, type: long, required: optional }
- { dd-name: spark.input_records, type: long, required: optional }
- { dd-name: spark.output_bytes, type: long, required: optional }
- { dd-name: spark.output_records, type: long, required: optional }
- { dd-name: spark.shuffle_read_bytes, type: long, required: optional }
- { dd-name: spark.shuffle_read_bytes_local, type: long, required: optional }
- { dd-name: spark.shuffle_read_bytes_remote, type: long, required: optional }
- { dd-name: spark.shuffle_read_bytes_remote_to_disk, type: long, required: optional }
- { dd-name: spark.shuffle_read_fetch_wait_time, type: long, required: optional }
- { dd-name: spark.shuffle_read_records, type: long, required: optional }
- { dd-name: spark.shuffle_write_bytes, type: long, required: optional }
- { dd-name: spark.shuffle_write_records, type: long, required: optional }
- { dd-name: spark.shuffle_write_time, type: long, required: optional }
# Driver spans summing their tasks' metrics: application, sql, job, stage and streaming batch.
spark.aggregate:
abstract: true
extends: spark.task_metrics
tags:
- { dd-name: spark.task_completed_count, type: long, required: optional }
- { dd-name: spark.task_failed_count, type: long, required: optional }
- { dd-name: spark.task_retried_count, type: long, required: optional }
- { dd-name: spark.task_with_output_count, type: long, required: optional }
- { dd-name: spark.available_executor_time, type: long, required: optional }
- { dd-name: spark.skew_time, type: long, required: optional }
spark.application:
extends: spark.aggregate
tags:
- { dd-name: application_name, type: string, required: recommended }
- { dd-name: spark_user, type: string, required: recommended }
- { dd-name: app_attempt_id, type: string, required: optional }
- { dd-name: djm.tags, type: string, required: optional } # the global tags, as k:v,...
- { dd-name: spark.max_executor_count, type: int, required: optional }
# Fixed members of the config.* family.
- { dd-name: config.spark_version, type: string, required: optional }
- { dd-name: config.spark_serializer, type: string, required: optional }
- { dd-name: emr_step_id, type: string, required: optional } # on EMR
# OpenLineage, when the app has an OpenLineage parent.
- { dd-name: spark.openlineage.appName, type: string, required: optional }
- { dd-name: openlineage_parent_job_namespace, type: string, required: optional }
- { dd-name: openlineage_parent_job_name, type: string, required: optional }
- { dd-name: openlineage_parent_run_id, type: string, required: optional }
- { dd-name: openlineage_root_parent_job_namespace, type: string, required: optional }
- { dd-name: openlineage_root_parent_job_name, type: string, required: optional }
- { dd-name: openlineage_root_parent_run_id, type: string, required: optional }
spark.sql:
extends: spark.aggregate
tags:
- { dd-name: query_id, type: long, required: recommended }
- { dd-name: description, type: string, required: optional }
- { dd-name: details, type: string, required: optional }
- { ref: config.spark_version } # top-level on Databricks
spark.job:
extends: spark.aggregate
tags:
- { dd-name: job_id, type: int, required: recommended }
- { dd-name: stage_count, type: int, required: optional }
- { ref: config.spark_serializer }
- { ref: config.spark_version } # top-level on Databricks
spark.stage:
extends: spark.aggregate
tags:
- { dd-name: stage_id, type: int, required: recommended }
- { dd-name: attempt_id, type: int, required: optional }
- { dd-name: parent_stage_ids, type: string, required: optional }
- { dd-name: task_count, type: int, required: optional }
- { ref: details }
- { ref: config.spark_serializer }
# The stage's part of its SQL plan, when it ran SQL.
- { dd-name: _dd.spark.sql_parent_stage_ids, type: string, required: optional }
- { dd-name: _dd.spark.sql_plan, type: string, required: optional }
# Base64 histograms over the stage's tasks, when there were any. Stage only: the driver's other
# spans sum their stages' metrics but don't merge these histograms.
- { dd-name: _dd.spark.task_run_time, type: string, required: optional }
- { dd-name: _dd.spark.input_bytes, type: string, required: optional }
- { dd-name: _dd.spark.output_bytes, type: string, required: optional }
- { dd-name: _dd.spark.shuffle_read_bytes, type: string, required: optional }
- { dd-name: _dd.spark.shuffle_write_bytes, type: string, required: optional }
- { dd-name: _dd.spark.disk_bytes_spilled, type: string, required: optional }
spark.streaming_batch:
extends: spark.aggregate
tags:
- { dd-name: streaming_query.id, type: string, required: recommended }
- { dd-name: streaming_query.run_id, type: string, required: recommended }
- { dd-name: streaming_query.batch_id, type: long, required: recommended }
- { dd-name: streaming_query.name, type: string, required: optional }
- { ref: config.spark_version }
- { dd-name: spark.num_input_rows, type: long, required: optional }
- { dd-name: spark.input_rows_per_second, type: double, required: optional }
- { dd-name: spark.processed_rows_per_second, type: double, required: optional }
- { dd-name: spark.event_time.watermark, type: long, required: optional }
- { dd-name: spark.event_time.watermark_gap, type: long, required: optional }
- { dd-name: spark.event_time.max, type: long, required: optional }
- { dd-name: spark.event_time.min, type: long, required: optional }
- { dd-name: spark.add_batch_duration, type: long, required: optional }
- { dd-name: spark.get_batch_duration, type: long, required: optional }
- { dd-name: spark.latest_offset_duration, type: long, required: optional }
- { dd-name: spark.query_planing_duration, type: long, required: optional }
- { dd-name: spark.trigger_execution_duration, type: long, required: optional }
- { dd-name: spark.wal_commit_duration, type: long, required: optional }
- { dd-name: spark.sink.description, type: string, required: optional }
# A task as the driver saw it finish.
spark.task:
extends: spark
tags:
- { dd-name: task_id, type: long, required: recommended }
- { dd-name: task_attempt_id, type: int, required: optional }
- { dd-name: task_type, type: string, required: optional }
- { ref: stage_id }
- { dd-name: stage_attempt_id, type: int, required: optional }
- { dd-name: executor_id, type: string, required: optional }
- { dd-name: host, type: string, required: optional }
- { dd-name: task_locality, type: string, required: optional }
- { dd-name: speculative, type: boolean, required: optional }
- { dd-name: status, type: string, required: optional }
- { dd-name: count_towards_task_failures, type: boolean, required: optional } # failed tasks
# A task running on an executor.
spark.executor.task:
extends: spark.task_metrics
tags:
- { ref: task_id }
- { dd-name: task_thread_name, type: string, required: optional }
- { ref: stage_id }
- { ref: stage_attempt_id }
- { ref: job_id }
- { ref: app_attempt_id }
- { ref: application_name }
# SparkLauncher launching an application.
spark.launcher:
extends: internal
tags:
- { ref: app_id }
- { dd-name: spark.app_id, type: string, required: optional }
- { ref: application_name }
- { ref: emr_step_id }
- { dd-name: master, type: string, required: optional }
- { dd-name: deploy_mode, type: string, required: optional }
- { dd-name: main_class, type: string, required: optional }
- { dd-name: app_resource, type: string, required: optional }
- { dd-name: spark.launcher.app_state, type: string, required: optional }
- { dd-name: spark.launcher.time_to_connected_ms, type: long, required: optional }
- { dd-name: spark.launcher.time_to_submitted_ms, type: long, required: optional }
- { dd-name: spark.launcher.time_to_running_ms, type: long, required: optional }
mixins:
# Databricks job and task ids, on the top-level span when Spark runs on Databricks, which has no
# application span: a SQL execution, a job or a streaming batch.
databricks:
applies: [ spark.sql, spark.job, spark.streaming_batch ]
tags:
- { dd-name: databricks_job_id, type: string, required: optional }
- { dd-name: databricks_job_run_id, type: string, required: optional }
- { dd-name: databricks_task_run_id, type: string, required: optional }
tags:
- { dd-name: resource.name, type: string }
- { dd-name: span.type, type: string }
- { dd-name: error, type: boolean }
- { dd-name: manual.keep, type: boolean }
- { dd-name: manual.drop, type: boolean }
- { dd-name: asm.keep, type: boolean }
- { dd-name: ai_guard.keep, type: boolean }
- { dd-name: sampling.priority, type: int }
- { dd-name: _dd.p.ts, type: int }
- { dd-name: _dd.p.debug, type: string }
- { dd-name: _dd.origin, type: string }
- { dd-name: _dd.measured, type: boolean }
- { dd-name: _dd1.sr.eausr, type: double }
intercepted:
- service
- peer.service
- span.kind
- servlet.context
- db.statement
- http.method
- http.url
- http.status_code
java_names:
aws_service: TOP_LEVEL_AWS_SERVICE # as InstrumentationTags names it; aws.service keeps AWS_SERVICE
service_name: SPARK_SERVICE_NAME # Spark's service_name; service's name constant is SERVICE_NAME