-
Notifications
You must be signed in to change notification settings - Fork 312
Migrate instrumentations to Context API #9358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Code coverage: total 57.29%, base diff -0.05%, patch 80.77% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: 9f10e63 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 11 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1049834
Total [baseline] (10.729 s) : 0, 10728538
Agent [candidate] (1.047 s) : 0, 1047346
Total [candidate] (10.685 s) : 0, 10684666
section appsec
Agent [baseline] (1.225 s) : 0, 1224884
Total [baseline] (10.841 s) : 0, 10840536
Agent [candidate] (1.225 s) : 0, 1224574
Total [candidate] (10.719 s) : 0, 10719216
section iast
Agent [baseline] (1.173 s) : 0, 1173496
Total [baseline] (10.86 s) : 0, 10860230
Agent [candidate] (1.173 s) : 0, 1172633
Total [candidate] (10.851 s) : 0, 10850563
section profiling
Agent [baseline] (1.199 s) : 0, 1198953
Total [baseline] (10.865 s) : 0, 10864777
Agent [candidate] (1.197 s) : 0, 1197334
Total [candidate] (10.824 s) : 0, 10823841
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.435 ms) : 0, 1435
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (733.935 ms) : 0, 733935
BytebuddyAgent [candidate] (732.738 ms) : 0, 732738
GlobalTracer [baseline] (242.235 ms) : 0, 242235
GlobalTracer [candidate] (242.08 ms) : 0, 242080
AppSec [baseline] (30.263 ms) : 0, 30263
AppSec [candidate] (30.08 ms) : 0, 30080
Debugger [baseline] (6.021 ms) : 0, 6021
Debugger [candidate] (6.007 ms) : 0, 6007
Remote Config [baseline] (646.56 µs) : 0, 647
Remote Config [candidate] (648.888 µs) : 0, 649
Telemetry [baseline] (14.251 ms) : 0, 14251
Telemetry [candidate] (13.358 ms) : 0, 13358
section appsec
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (756.492 ms) : 0, 756492
BytebuddyAgent [candidate] (757.067 ms) : 0, 757067
GlobalTracer [baseline] (235.71 ms) : 0, 235710
GlobalTracer [candidate] (235.69 ms) : 0, 235690
IAST [baseline] (23.723 ms) : 0, 23723
IAST [candidate] (23.701 ms) : 0, 23701
AppSec [baseline] (168.514 ms) : 0, 168514
AppSec [candidate] (167.207 ms) : 0, 167207
Debugger [baseline] (8.109 ms) : 0, 8109
Debugger [candidate] (8.576 ms) : 0, 8576
Remote Config [baseline] (620.598 µs) : 0, 621
Remote Config [candidate] (613.099 µs) : 0, 613
Telemetry [baseline] (9.217 ms) : 0, 9217
Telemetry [candidate] (9.123 ms) : 0, 9123
section iast
crashtracking [baseline] (1.415 ms) : 0, 1415
crashtracking [candidate] (1.42 ms) : 0, 1420
BytebuddyAgent [baseline] (847.912 ms) : 0, 847912
BytebuddyAgent [candidate] (847.405 ms) : 0, 847405
GlobalTracer [baseline] (232.339 ms) : 0, 232339
GlobalTracer [candidate] (231.831 ms) : 0, 231831
IAST [baseline] (28.206 ms) : 0, 28206
IAST [candidate] (29.43 ms) : 0, 29430
AppSec [baseline] (27.356 ms) : 0, 27356
AppSec [candidate] (27.178 ms) : 0, 27178
Debugger [baseline] (6.485 ms) : 0, 6485
Debugger [candidate] (5.693 ms) : 0, 5693
Remote Config [baseline] (564.596 µs) : 0, 565
Remote Config [candidate] (570.304 µs) : 0, 570
Telemetry [baseline] (8.227 ms) : 0, 8227
Telemetry [candidate] (8.261 ms) : 0, 8261
section profiling
crashtracking [baseline] (1.409 ms) : 0, 1409
crashtracking [candidate] (1.412 ms) : 0, 1412
BytebuddyAgent [baseline] (763.639 ms) : 0, 763639
BytebuddyAgent [candidate] (763.378 ms) : 0, 763378
GlobalTracer [baseline] (222.502 ms) : 0, 222502
GlobalTracer [candidate] (222.531 ms) : 0, 222531
AppSec [baseline] (30.21 ms) : 0, 30210
AppSec [candidate] (30.05 ms) : 0, 30050
Debugger [baseline] (6.246 ms) : 0, 6246
Debugger [candidate] (6.338 ms) : 0, 6338
Remote Config [baseline] (686.551 µs) : 0, 687
Remote Config [candidate] (670.725 µs) : 0, 671
Telemetry [baseline] (16.279 ms) : 0, 16279
Telemetry [candidate] (16.037 ms) : 0, 16037
ProfilingAgent [baseline] (108.407 ms) : 0, 108407
ProfilingAgent [candidate] (107.326 ms) : 0, 107326
Profiling [baseline] (109.042 ms) : 0, 109042
Profiling [candidate] (108.002 ms) : 0, 108002
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.042 s) : 0, 1042357
Total [baseline] (8.548 s) : 0, 8547706
Agent [candidate] (1.048 s) : 0, 1048389
Total [candidate] (8.567 s) : 0, 8566677
section iast
Agent [baseline] (1.173 s) : 0, 1172671
Total [baseline] (9.263 s) : 0, 9262941
Agent [candidate] (1.184 s) : 0, 1183638
Total [candidate] (9.343 s) : 0, 9343375
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.423 ms) : 0, 1423
crashtracking [candidate] (1.431 ms) : 0, 1431
BytebuddyAgent [baseline] (729.391 ms) : 0, 729391
BytebuddyAgent [candidate] (734.64 ms) : 0, 734640
GlobalTracer [baseline] (240.838 ms) : 0, 240838
GlobalTracer [candidate] (242.231 ms) : 0, 242231
AppSec [baseline] (29.951 ms) : 0, 29951
AppSec [candidate] (30.345 ms) : 0, 30345
Debugger [baseline] (5.995 ms) : 0, 5995
Debugger [candidate] (6.04 ms) : 0, 6040
Remote Config [baseline] (643.664 µs) : 0, 644
Remote Config [candidate] (650.536 µs) : 0, 651
Telemetry [baseline] (13.275 ms) : 0, 13275
Telemetry [candidate] (12.018 ms) : 0, 12018
section iast
crashtracking [baseline] (1.416 ms) : 0, 1416
crashtracking [candidate] (1.442 ms) : 0, 1442
BytebuddyAgent [baseline] (846.952 ms) : 0, 846952
BytebuddyAgent [candidate] (855.173 ms) : 0, 855173
GlobalTracer [baseline] (231.894 ms) : 0, 231894
GlobalTracer [candidate] (233.19 ms) : 0, 233190
IAST [baseline] (27.926 ms) : 0, 27926
IAST [candidate] (30.249 ms) : 0, 30249
AppSec [baseline] (27.409 ms) : 0, 27409
AppSec [candidate] (27.684 ms) : 0, 27684
Debugger [baseline] (7.489 ms) : 0, 7489
Debugger [candidate] (5.793 ms) : 0, 5793
Remote Config [baseline] (567.555 µs) : 0, 568
Remote Config [candidate] (590.892 µs) : 0, 591
Telemetry [baseline] (8.173 ms) : 0, 8173
Telemetry [candidate] (8.428 ms) : 0, 8428
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section baseline
no_agent (37.669 ms) : 37360, 37979
. : milestone, 37669,
appsec (46.438 ms) : 46031, 46845
. : milestone, 46438,
code_origins (45.125 ms) : 44726, 45524
. : milestone, 45125,
iast (46.389 ms) : 45999, 46778
. : milestone, 46389,
profiling (48.054 ms) : 47604, 48504
. : milestone, 48054,
tracing (45.196 ms) : 44821, 45571
. : milestone, 45196,
section candidate
no_agent (38.361 ms) : 38056, 38667
. : milestone, 38361,
appsec (46.738 ms) : 46329, 47148
. : milestone, 46738,
code_origins (46.419 ms) : 46019, 46818
. : milestone, 46419,
iast (44.538 ms) : 44166, 44909
. : milestone, 44538,
profiling (47.171 ms) : 46714, 47628
. : milestone, 47171,
tracing (45.338 ms) : 44947, 45728
. : milestone, 45338,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section baseline
no_agent (4.37 ms) : 4315, 4425
. : milestone, 4370,
iast (9.392 ms) : 9238, 9546
. : milestone, 9392,
iast_FULL (13.606 ms) : 13340, 13872
. : milestone, 13606,
iast_GLOBAL (10.22 ms) : 10039, 10400
. : milestone, 10220,
profiling (9.214 ms) : 9063, 9365
. : milestone, 9214,
tracing (8.006 ms) : 7893, 8119
. : milestone, 8006,
section candidate
no_agent (4.442 ms) : 4392, 4493
. : milestone, 4442,
iast (9.263 ms) : 9107, 9418
. : milestone, 9263,
iast_FULL (13.804 ms) : 13530, 14077
. : milestone, 13804,
iast_GLOBAL (10.358 ms) : 10177, 10539
. : milestone, 10358,
profiling (8.654 ms) : 8518, 8789
. : milestone, 8654,
tracing (7.627 ms) : 7512, 7743
. : milestone, 7627,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (3.671 ms) : 3453, 3889
. : milestone, 3671,
iast (2.204 ms) : 2141, 2268
. : milestone, 2204,
iast_GLOBAL (2.242 ms) : 2179, 2305
. : milestone, 2242,
profiling (2.04 ms) : 1989, 2090
. : milestone, 2040,
tracing (2.016 ms) : 1967, 2064
. : milestone, 2016,
section candidate
no_agent (1.48 ms) : 1468, 1492
. : milestone, 1480,
appsec (3.679 ms) : 3462, 3897
. : milestone, 3679,
iast (2.197 ms) : 2133, 2260
. : milestone, 2197,
iast_GLOBAL (2.246 ms) : 2183, 2309
. : milestone, 2246,
profiling (2.056 ms) : 2005, 2107
. : milestone, 2056,
tracing (2.024 ms) : 1975, 2073
. : milestone, 2024,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~9f10e63c77, baseline=1.53.0-SNAPSHOT~a11444c5f6
dateFormat X
axisFormat %s
section baseline
no_agent (14.928 s) : 14928000, 14928000
. : milestone, 14928000,
appsec (14.835 s) : 14835000, 14835000
. : milestone, 14835000,
iast (18.431 s) : 18431000, 18431000
. : milestone, 18431000,
iast_GLOBAL (18.235 s) : 18235000, 18235000
. : milestone, 18235000,
profiling (15.78 s) : 15780000, 15780000
. : milestone, 15780000,
tracing (14.996 s) : 14996000, 14996000
. : milestone, 14996000,
section candidate
no_agent (15.356 s) : 15356000, 15356000
. : milestone, 15356000,
appsec (14.825 s) : 14825000, 14825000
. : milestone, 14825000,
iast (18.749 s) : 18749000, 18749000
. : milestone, 18749000,
iast_GLOBAL (18.083 s) : 18083000, 18083000
. : milestone, 18083000,
profiling (15.381 s) : 15381000, 15381000
. : milestone, 15381000,
tracing (15.225 s) : 15225000, 15225000
. : milestone, 15225000,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did an overall review, particularly focusing on the AppSec instrumentations, looks good to me.
import net.bytebuddy.asm.Advice; | ||
|
||
public class HTTPPluginAdvice { | ||
|
||
@Advice.OnMethodEnter(suppress = Throwable.class) | ||
public static AgentScope onEnter(@Advice.Argument(value = 2) final Object serverTransaction) { | ||
final AgentSpan span = startSpan(DECORATE.spanName()).setMeasured(true); | ||
final AgentSpan span = startSpan("axway-api", DECORATE.spanName()).setMeasured(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't verify axway-api
is the correct integration name just based on the diff, but worth a double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is:
Line 18 in e8df8a0
super("axway-api"); |
Not sure why I fixed this call in particular 🤷 Found a warning while reading the code and can't help myself 😅 But it's more to the IDM team to fix it.
...rtx-web-3.4/src/main/java/datadog/trace/instrumentation/vertx_3_4/server/VertxDecorator.java
Outdated
Show resolved
Hide resolved
364cab5
to
9f10e63
Compare
What Does This Do
Migrate
HttpServerDecorator.onRequest()
to the Context API.In particular, get rid of the duplicate version using
AgentSpan.Extracted
instead.This lead to overridden decorators no longer being called when moved to the
Context
based version -- unclear how tests did not catch it.Motivation
Move instrumentation API to the Context API to decouple products and move toward better performance.
Additional Notes
Follow up PR of #9211
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: LANGPLAT-680