-
Notifications
You must be signed in to change notification settings - Fork 311
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
base: master
Are you sure you want to change the base?
Conversation
Code coverage: total 57.30%, base diff -0.03%, patch 80.77% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: c23bbe5 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1049903
Total [baseline] (10.756 s) : 0, 10756239
Agent [candidate] (1.046 s) : 0, 1046499
Total [candidate] (10.711 s) : 0, 10710541
section appsec
Agent [baseline] (1.218 s) : 0, 1218158
Total [baseline] (10.77 s) : 0, 10770384
Agent [candidate] (1.222 s) : 0, 1222461
Total [candidate] (10.786 s) : 0, 10786219
section iast
Agent [baseline] (1.178 s) : 0, 1178020
Total [baseline] (10.939 s) : 0, 10939452
Agent [candidate] (1.178 s) : 0, 1178003
Total [candidate] (10.979 s) : 0, 10979374
section profiling
Agent [baseline] (1.194 s) : 0, 1193839
Total [baseline] (10.935 s) : 0, 10934689
Agent [candidate] (1.197 s) : 0, 1197205
Total [candidate] (10.903 s) : 0, 10903494
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.439 ms) : 0, 1439
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (736.216 ms) : 0, 736216
BytebuddyAgent [candidate] (732.651 ms) : 0, 732651
GlobalTracer [baseline] (243.546 ms) : 0, 243546
GlobalTracer [candidate] (242.051 ms) : 0, 242051
AppSec [baseline] (30.244 ms) : 0, 30244
AppSec [candidate] (30.044 ms) : 0, 30044
Debugger [baseline] (6.041 ms) : 0, 6041
Debugger [candidate] (6.019 ms) : 0, 6019
Remote Config [baseline] (650.77 µs) : 0, 651
Remote Config [candidate] (647.468 µs) : 0, 647
Telemetry [baseline] (10.639 ms) : 0, 10639
Telemetry [candidate] (12.577 ms) : 0, 12577
section appsec
crashtracking [baseline] (1.43 ms) : 0, 1430
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (751.852 ms) : 0, 751852
BytebuddyAgent [candidate] (755.527 ms) : 0, 755527
GlobalTracer [baseline] (234.816 ms) : 0, 234816
GlobalTracer [candidate] (235.51 ms) : 0, 235510
IAST [baseline] (23.471 ms) : 0, 23471
IAST [candidate] (23.338 ms) : 0, 23338
AppSec [baseline] (168.647 ms) : 0, 168647
AppSec [candidate] (169.358 ms) : 0, 169358
Debugger [baseline] (7.147 ms) : 0, 7147
Debugger [candidate] (7.213 ms) : 0, 7213
Remote Config [baseline] (610.861 µs) : 0, 611
Remote Config [candidate] (626.765 µs) : 0, 627
Telemetry [baseline] (9.105 ms) : 0, 9105
Telemetry [candidate] (8.412 ms) : 0, 8412
section iast
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.437 ms) : 0, 1437
BytebuddyAgent [baseline] (849.956 ms) : 0, 849956
BytebuddyAgent [candidate] (850.53 ms) : 0, 850530
GlobalTracer [baseline] (233.004 ms) : 0, 233004
GlobalTracer [candidate] (232.974 ms) : 0, 232974
IAST [baseline] (26.727 ms) : 0, 26727
IAST [candidate] (31.353 ms) : 0, 31353
AppSec [baseline] (26.947 ms) : 0, 26947
AppSec [candidate] (25.998 ms) : 0, 25998
Debugger [baseline] (9.178 ms) : 0, 9178
Debugger [candidate] (5.781 ms) : 0, 5781
Remote Config [baseline] (584.035 µs) : 0, 584
Remote Config [candidate] (576.935 µs) : 0, 577
Telemetry [baseline] (9.12 ms) : 0, 9120
Telemetry [candidate] (8.334 ms) : 0, 8334
section profiling
crashtracking [baseline] (1.399 ms) : 0, 1399
crashtracking [candidate] (1.401 ms) : 0, 1401
BytebuddyAgent [baseline] (759.888 ms) : 0, 759888
BytebuddyAgent [candidate] (763.724 ms) : 0, 763724
GlobalTracer [baseline] (221.381 ms) : 0, 221381
GlobalTracer [candidate] (221.54 ms) : 0, 221540
AppSec [baseline] (29.903 ms) : 0, 29903
AppSec [candidate] (29.838 ms) : 0, 29838
Debugger [baseline] (6.244 ms) : 0, 6244
Debugger [candidate] (6.3 ms) : 0, 6300
Remote Config [baseline] (718.774 µs) : 0, 719
Remote Config [candidate] (706.393 µs) : 0, 706
Telemetry [baseline] (15.951 ms) : 0, 15951
Telemetry [candidate] (16.081 ms) : 0, 16081
ProfilingAgent [baseline] (108.819 ms) : 0, 108819
ProfilingAgent [candidate] (107.763 ms) : 0, 107763
Profiling [baseline] (109.458 ms) : 0, 109458
Profiling [candidate] (108.39 ms) : 0, 108390
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1044497
Total [baseline] (8.623 s) : 0, 8623095
Agent [candidate] (1.046 s) : 0, 1045565
Total [candidate] (8.63 s) : 0, 8629858
section iast
Agent [baseline] (1.184 s) : 0, 1184427
Total [baseline] (9.361 s) : 0, 9360799
Agent [candidate] (1.185 s) : 0, 1185290
Total [candidate] (9.387 s) : 0, 9386766
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (730.827 ms) : 0, 730827
BytebuddyAgent [candidate] (732.217 ms) : 0, 732217
GlobalTracer [baseline] (241.799 ms) : 0, 241799
GlobalTracer [candidate] (242.757 ms) : 0, 242757
AppSec [baseline] (29.99 ms) : 0, 29990
AppSec [candidate] (30.155 ms) : 0, 30155
Debugger [baseline] (6.033 ms) : 0, 6033
Debugger [candidate] (6.026 ms) : 0, 6026
Remote Config [baseline] (655.516 µs) : 0, 656
Remote Config [candidate] (654.336 µs) : 0, 654
Telemetry [baseline] (12.864 ms) : 0, 12864
Telemetry [candidate] (11.356 ms) : 0, 11356
section iast
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.436 ms) : 0, 1436
BytebuddyAgent [baseline] (856.073 ms) : 0, 856073
BytebuddyAgent [candidate] (855.569 ms) : 0, 855569
GlobalTracer [baseline] (234.755 ms) : 0, 234755
GlobalTracer [candidate] (234.57 ms) : 0, 234570
AppSec [baseline] (28.188 ms) : 0, 28188
AppSec [candidate] (29.38 ms) : 0, 29380
Debugger [baseline] (5.697 ms) : 0, 5697
Debugger [candidate] (6.537 ms) : 0, 6537
Remote Config [baseline] (564.205 µs) : 0, 564
Remote Config [candidate] (578.88 µs) : 0, 579
Telemetry [baseline] (8.249 ms) : 0, 8249
Telemetry [candidate] (9.104 ms) : 0, 9104
IAST [baseline] (28.408 ms) : 0, 28408
IAST [candidate] (27.046 ms) : 0, 27046
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section baseline
no_agent (4.181 ms) : 4132, 4229
. : milestone, 4181,
iast (9.323 ms) : 9168, 9478
. : milestone, 9323,
iast_FULL (13.885 ms) : 13614, 14156
. : milestone, 13885,
iast_GLOBAL (10.015 ms) : 9838, 10192
. : milestone, 10015,
profiling (9.028 ms) : 8888, 9167
. : milestone, 9028,
tracing (7.481 ms) : 7364, 7597
. : milestone, 7481,
section candidate
no_agent (4.27 ms) : 4224, 4317
. : milestone, 4270,
iast (9.613 ms) : 9456, 9771
. : milestone, 9613,
iast_FULL (14.203 ms) : 13919, 14487
. : milestone, 14203,
iast_GLOBAL (10.264 ms) : 10084, 10445
. : milestone, 10264,
profiling (8.422 ms) : 8293, 8551
. : milestone, 8422,
tracing (7.455 ms) : 7350, 7559
. : milestone, 7455,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section baseline
no_agent (36.966 ms) : 36674, 37258
. : milestone, 36966,
appsec (47.37 ms) : 46945, 47795
. : milestone, 47370,
code_origins (45.487 ms) : 45092, 45883
. : milestone, 45487,
iast (43.705 ms) : 43333, 44078
. : milestone, 43705,
profiling (49.239 ms) : 48785, 49694
. : milestone, 49239,
tracing (43.644 ms) : 43274, 44013
. : milestone, 43644,
section candidate
no_agent (35.454 ms) : 35168, 35739
. : milestone, 35454,
appsec (48.861 ms) : 48415, 49307
. : milestone, 48861,
code_origins (44.578 ms) : 44182, 44973
. : milestone, 44578,
iast (44.646 ms) : 44250, 45042
. : milestone, 44646,
profiling (51.177 ms) : 50688, 51665
. : milestone, 51177,
tracing (43.625 ms) : 43262, 43987
. : milestone, 43625,
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~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (2.423 ms) : 2373, 2474
. : milestone, 2423,
iast (2.218 ms) : 2155, 2281
. : milestone, 2218,
iast_GLOBAL (2.262 ms) : 2198, 2326
. : milestone, 2262,
profiling (2.052 ms) : 2001, 2102
. : milestone, 2052,
tracing (2.028 ms) : 1979, 2078
. : milestone, 2028,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (3.669 ms) : 3452, 3887
. : milestone, 3669,
iast (2.209 ms) : 2146, 2272
. : milestone, 2209,
iast_GLOBAL (2.249 ms) : 2186, 2312
. : milestone, 2249,
profiling (2.038 ms) : 1988, 2088
. : milestone, 2038,
tracing (2.026 ms) : 1977, 2075
. : milestone, 2026,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~c23bbe5d77, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
dateFormat X
axisFormat %s
section baseline
no_agent (15.089 s) : 15089000, 15089000
. : milestone, 15089000,
appsec (14.81 s) : 14810000, 14810000
. : milestone, 14810000,
iast (18.535 s) : 18535000, 18535000
. : milestone, 18535000,
iast_GLOBAL (18.168 s) : 18168000, 18168000
. : milestone, 18168000,
profiling (15.682 s) : 15682000, 15682000
. : milestone, 15682000,
tracing (15.023 s) : 15023000, 15023000
. : milestone, 15023000,
section candidate
no_agent (14.963 s) : 14963000, 14963000
. : milestone, 14963000,
appsec (14.861 s) : 14861000, 14861000
. : milestone, 14861000,
iast (18.423 s) : 18423000, 18423000
. : milestone, 18423000,
iast_GLOBAL (17.985 s) : 17985000, 17985000
. : milestone, 17985000,
profiling (15.323 s) : 15323000, 15323000
. : milestone, 15323000,
tracing (14.827 s) : 14827000, 14827000
. : milestone, 14827000,
|
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.
@@ -58,7 +57,7 @@ public AgentSpan onRequest( | |||
final AgentSpan span, | |||
final RoutingContext connection, | |||
final RoutingContext routingContext, | |||
AgentSpanContext.Extracted context) { | |||
final datadog.context.Context context) { |
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.
so small, but could import Context here as well?
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.
Sure, will fix it
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