Repository navigation
Spark Executor Tasks Instrumentation - #6515
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~89aa6af746, baseline=1.31.0-SNAPSHOT~142c8cac77
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1063304
Total [baseline] (9.387 s) : 0, 9386511
Agent [candidate] (1.075 s) : 0, 1075032
Total [candidate] (9.37 s) : 0, 9369995
section appsec
Agent [baseline] (1.16 s) : 0, 1160169
Total [baseline] (9.465 s) : 0, 9465386
Agent [candidate] (1.175 s) : 0, 1174712
Total [candidate] (9.499 s) : 0, 9498584
section iast
Agent [baseline] (1.188 s) : 0, 1188371
Total [baseline] (9.681 s) : 0, 9681306
Agent [candidate] (1.196 s) : 0, 1195891
Total [candidate] (9.69 s) : 0, 9690356
section profiling
Agent [baseline] (1.275 s) : 0, 1274505
Total [baseline] (9.533 s) : 0, 9532880
Agent [candidate] (1.278 s) : 0, 1278404
Total [candidate] (9.543 s) : 0, 9543488
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~89aa6af746, baseline=1.31.0-SNAPSHOT~142c8cac77
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (670.091 ms) : 0, 670091
BytebuddyAgent [candidate] (676.957 ms) : 0, 676957
GlobalTracer [baseline] (298.848 ms) : 0, 298848
GlobalTracer [candidate] (302.715 ms) : 0, 302715
AppSec [baseline] (51.347 ms) : 0, 51347
AppSec [candidate] (52.178 ms) : 0, 52178
Remote Config [baseline] (708.316 µs) : 0, 708
Remote Config [candidate] (717.75 µs) : 0, 718
Telemetry [baseline] (7.692 ms) : 0, 7692
Telemetry [candidate] (7.786 ms) : 0, 7786
section appsec
BytebuddyAgent [baseline] (668.421 ms) : 0, 668421
BytebuddyAgent [candidate] (677.461 ms) : 0, 677461
GlobalTracer [baseline] (299.082 ms) : 0, 299082
GlobalTracer [candidate] (302.918 ms) : 0, 302918
AppSec [baseline] (150.766 ms) : 0, 150766
AppSec [candidate] (152.011 ms) : 0, 152011
Remote Config [baseline] (635.048 µs) : 0, 635
Remote Config [candidate] (647.176 µs) : 0, 647
Telemetry [baseline] (6.832 ms) : 0, 6832
Telemetry [candidate] (6.942 ms) : 0, 6942
section iast
BytebuddyAgent [baseline] (779.854 ms) : 0, 779854
BytebuddyAgent [candidate] (787.368 ms) : 0, 787368
GlobalTracer [baseline] (292.049 ms) : 0, 292049
GlobalTracer [candidate] (291.005 ms) : 0, 291005
AppSec [baseline] (54.869 ms) : 0, 54869
AppSec [candidate] (52.514 ms) : 0, 52514
IAST [baseline] (19.965 ms) : 0, 19965
IAST [candidate] (23.211 ms) : 0, 23211
Remote Config [baseline] (604.078 µs) : 0, 604
Remote Config [candidate] (608.268 µs) : 0, 608
Telemetry [baseline] (6.702 ms) : 0, 6702
Telemetry [candidate] (6.552 ms) : 0, 6552
section profiling
BytebuddyAgent [baseline] (664.235 ms) : 0, 664235
BytebuddyAgent [candidate] (666.83 ms) : 0, 666830
GlobalTracer [baseline] (380.482 ms) : 0, 380482
GlobalTracer [candidate] (382.165 ms) : 0, 382165
AppSec [baseline] (51.963 ms) : 0, 51963
AppSec [candidate] (51.529 ms) : 0, 51529
Remote Config [baseline] (660.876 µs) : 0, 661
Remote Config [candidate] (651.527 µs) : 0, 652
Telemetry [baseline] (12.254 ms) : 0, 12254
Telemetry [candidate] (10.864 ms) : 0, 10864
ProfilingAgent [baseline] (110.453 ms) : 0, 110453
ProfilingAgent [candidate] (111.816 ms) : 0, 111816
Profiling [baseline] (110.478 ms) : 0, 110478
Profiling [candidate] (111.84 ms) : 0, 111840
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 15 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~89aa6af746, baseline=1.31.0-SNAPSHOT~142c8cac77
dateFormat X
axisFormat %s
section baseline
no_agent (1.354 ms) : 1335, 1373
. : milestone, 1354,
appsec (1.791 ms) : 1766, 1816
. : milestone, 1791,
iast (1.52 ms) : 1496, 1545
. : milestone, 1520,
profiling (1.572 ms) : 1546, 1599
. : milestone, 1572,
tracing (1.51 ms) : 1485, 1535
. : milestone, 1510,
section candidate
no_agent (1.339 ms) : 1320, 1358
. : milestone, 1339,
appsec (1.795 ms) : 1770, 1820
. : milestone, 1795,
iast (1.534 ms) : 1510, 1559
. : milestone, 1534,
profiling (1.538 ms) : 1511, 1564
. : milestone, 1538,
tracing (1.481 ms) : 1455, 1506
. : milestone, 1481,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~89aa6af746, baseline=1.31.0-SNAPSHOT~142c8cac77
dateFormat X
axisFormat %s
section baseline
no_agent (366.963 µs) : 347, 387
. : milestone, 367,
iast (469.142 µs) : 448, 490
. : milestone, 469,
iast_FULL (536.229 µs) : 516, 557
. : milestone, 536,
iast_GLOBAL (495.686 µs) : 475, 516
. : milestone, 496,
iast_HARDCODED_SECRET_DISABLED (480.617 µs) : 460, 501
. : milestone, 481,
iast_INACTIVE (452.279 µs) : 431, 474
. : milestone, 452,
iast_TELEMETRY_OFF (469.231 µs) : 448, 490
. : milestone, 469,
tracing (445.233 µs) : 424, 466
. : milestone, 445,
section candidate
no_agent (372.117 µs) : 351, 393
. : milestone, 372,
iast (480.916 µs) : 460, 502
. : milestone, 481,
iast_FULL (527.794 µs) : 507, 548
. : milestone, 528,
iast_GLOBAL (485.963 µs) : 466, 506
. : milestone, 486,
iast_HARDCODED_SECRET_DISABLED (478.788 µs) : 458, 499
. : milestone, 479,
iast_INACTIVE (443.347 µs) : 423, 464
. : milestone, 443,
iast_TELEMETRY_OFF (471.34 µs) : 451, 492
. : milestone, 471,
tracing (440.293 µs) : 420, 461
. : milestone, 440,
|
bm1549
left a comment
There was a problem hiding this comment.
Can you also update CODEOWNERS so that data-jobs-monitoring owns the instrumentation files here?
|
@bm1549 In order to add the team @DataDog/data-jobs-monitoring as CODEOWNERS, it need to have access to the repository
|
|
@paul-laffon-dd it seems like that team is not a subteam of https://github.com/orgs/DataDog/teams/dev which is causing the issue @tiffon as maintainer of the team, can you update the parent team to be dev? |
|
Thanks @bm1549, we updated the team settings and the CODEOWNERS file is now valid |
| DECORATE.onTaskEnd(span, taskRunner); | ||
| DECORATE.beforeFinish(scope); | ||
|
|
||
| scope.close(); |
There was a problem hiding this comment.
span.close & finish should be in finally blocks.
There was a problem hiding this comment.
Move those in finally block
dougqh
left a comment
There was a problem hiding this comment.
Scope.close and span.finish should probably be in finally blocks; otherwise, you risk traces not being published in a timely fashion.
| DECORATE.onTaskEnd(span, taskRunner); | ||
| DECORATE.beforeFinish(scope); | ||
| } finally { | ||
| scope.close(); |
There was a problem hiding this comment.
I think this is probably fine, but typically each clean-up needs to be in its own finally block.
In this case - if scope.close raises an exception then you won't perform span.finish.

What Does This Do
Add a new instrumentation
spark-executorto trace tasks running on spark executorsThe existing spark instrumentation is running on the spark driver, capturing spark internals (spark.sql, spark.job, spark.stage...), while this new instrumentation will trace task being run on spark executors.
Motivation
Generate traces for
spark.task, with underlying spans (like s3 or database calls) being linked.Additional Notes
each
spark.taskis a distinct trace and not on the existingspark.application/spark.jobtraces:spark.task, while allspark.applicationandspark.jobtraces are keptspark.taskto other spark tracestask errors are not captured for now