-
Notifications
You must be signed in to change notification settings - Fork 312
Migrate instrumentations to Context API #9378
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
Converting as draft as there is another AWS instrumentation to convert for this PR. Review still welcomed about the actual content. |
Code coverage: total 57.33%, base diff -0.02%, patch 66.67% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: d73f349 | 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 insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1047223
Total [baseline] (8.631 s) : 0, 8631179
Agent [candidate] (1.057 s) : 0, 1057130
Total [candidate] (8.576 s) : 0, 8576220
section iast
Agent [baseline] (1.181 s) : 0, 1181428
Total [baseline] (9.294 s) : 0, 9294469
Agent [candidate] (1.188 s) : 0, 1188479
Total [candidate] (9.292 s) : 0, 9291985
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (734.258 ms) : 0, 734258
BytebuddyAgent [candidate] (738.662 ms) : 0, 738662
GlobalTracer [baseline] (242.257 ms) : 0, 242257
GlobalTracer [candidate] (244.04 ms) : 0, 244040
AppSec [baseline] (30.082 ms) : 0, 30082
AppSec [candidate] (30.457 ms) : 0, 30457
Debugger [baseline] (6.028 ms) : 0, 6028
Debugger [candidate] (6.093 ms) : 0, 6093
Remote Config [baseline] (669.336 µs) : 0, 669
Remote Config [candidate] (676.705 µs) : 0, 677
Telemetry [baseline] (11.481 ms) : 0, 11481
Telemetry [candidate] (14.62 ms) : 0, 14620
section iast
crashtracking [baseline] (1.454 ms) : 0, 1454
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (852.18 ms) : 0, 852180
BytebuddyAgent [candidate] (858.366 ms) : 0, 858366
GlobalTracer [baseline] (233.574 ms) : 0, 233574
GlobalTracer [candidate] (234.124 ms) : 0, 234124
IAST [baseline] (27.721 ms) : 0, 27721
IAST [candidate] (31.692 ms) : 0, 31692
AppSec [baseline] (29.535 ms) : 0, 29535
AppSec [candidate] (26.895 ms) : 0, 26895
Debugger [baseline] (6.785 ms) : 0, 6785
Debugger [candidate] (5.793 ms) : 0, 5793
Remote Config [baseline] (626.456 µs) : 0, 626
Remote Config [candidate] (614.048 µs) : 0, 614
Telemetry [baseline] (8.453 ms) : 0, 8453
Telemetry [candidate] (8.427 ms) : 0, 8427
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055493
Total [baseline] (10.778 s) : 0, 10777893
Agent [candidate] (1.063 s) : 0, 1062720
Total [candidate] (10.774 s) : 0, 10773881
section appsec
Agent [baseline] (1.232 s) : 0, 1232248
Total [baseline] (10.822 s) : 0, 10821680
Agent [candidate] (1.227 s) : 0, 1226690
Total [candidate] (10.809 s) : 0, 10808636
section iast
Agent [baseline] (1.179 s) : 0, 1178864
Total [baseline] (10.952 s) : 0, 10951708
Agent [candidate] (1.18 s) : 0, 1180155
Total [candidate] (10.975 s) : 0, 10974713
section profiling
Agent [baseline] (1.199 s) : 0, 1198886
Total [baseline] (10.922 s) : 0, 10922211
Agent [candidate] (1.196 s) : 0, 1195881
Total [candidate] (10.843 s) : 0, 10842866
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (737.798 ms) : 0, 737798
BytebuddyAgent [candidate] (743.168 ms) : 0, 743168
GlobalTracer [baseline] (243.881 ms) : 0, 243881
GlobalTracer [candidate] (245.36 ms) : 0, 245360
AppSec [baseline] (30.493 ms) : 0, 30493
AppSec [candidate] (30.779 ms) : 0, 30779
Debugger [baseline] (6.083 ms) : 0, 6083
Debugger [candidate] (6.132 ms) : 0, 6132
Remote Config [baseline] (679.695 µs) : 0, 680
Remote Config [candidate] (689.229 µs) : 0, 689
Telemetry [baseline] (13.811 ms) : 0, 13811
Telemetry [candidate] (13.826 ms) : 0, 13826
section appsec
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (761.57 ms) : 0, 761570
BytebuddyAgent [candidate] (757.714 ms) : 0, 757714
GlobalTracer [baseline] (237.333 ms) : 0, 237333
GlobalTracer [candidate] (236.089 ms) : 0, 236089
IAST [baseline] (23.807 ms) : 0, 23807
IAST [candidate] (23.653 ms) : 0, 23653
AppSec [baseline] (169.556 ms) : 0, 169556
AppSec [candidate] (170.158 ms) : 0, 170158
Debugger [baseline] (7.288 ms) : 0, 7288
Debugger [candidate] (7.3 ms) : 0, 7300
Remote Config [baseline] (645.008 µs) : 0, 645
Remote Config [candidate] (634.082 µs) : 0, 634
Telemetry [baseline] (9.289 ms) : 0, 9289
Telemetry [candidate] (8.515 ms) : 0, 8515
section iast
crashtracking [baseline] (1.452 ms) : 0, 1452
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (850.376 ms) : 0, 850376
BytebuddyAgent [candidate] (851.957 ms) : 0, 851957
GlobalTracer [baseline] (232.949 ms) : 0, 232949
GlobalTracer [candidate] (233.409 ms) : 0, 233409
IAST [baseline] (32.08 ms) : 0, 32080
IAST [candidate] (29.97 ms) : 0, 29970
AppSec [baseline] (25.149 ms) : 0, 25149
AppSec [candidate] (27.641 ms) : 0, 27641
Debugger [baseline] (6.688 ms) : 0, 6688
Debugger [candidate] (5.791 ms) : 0, 5791
Remote Config [baseline] (617.53 µs) : 0, 618
Remote Config [candidate] (615.461 µs) : 0, 615
Telemetry [baseline] (8.488 ms) : 0, 8488
Telemetry [candidate] (8.297 ms) : 0, 8297
section profiling
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.413 ms) : 0, 1413
BytebuddyAgent [baseline] (763.453 ms) : 0, 763453
BytebuddyAgent [candidate] (761.616 ms) : 0, 761616
GlobalTracer [baseline] (222.566 ms) : 0, 222566
GlobalTracer [candidate] (222.303 ms) : 0, 222303
AppSec [baseline] (30.202 ms) : 0, 30202
AppSec [candidate] (30.074 ms) : 0, 30074
Debugger [baseline] (6.307 ms) : 0, 6307
Debugger [candidate] (6.323 ms) : 0, 6323
Remote Config [baseline] (724.581 µs) : 0, 725
Remote Config [candidate] (701.263 µs) : 0, 701
Telemetry [baseline] (15.658 ms) : 0, 15658
Telemetry [candidate] (16.171 ms) : 0, 16171
ProfilingAgent [baseline] (108.723 ms) : 0, 108723
ProfilingAgent [candidate] (107.712 ms) : 0, 107712
Profiling [baseline] (109.35 ms) : 0, 109350
Profiling [candidate] (108.365 ms) : 0, 108365
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section baseline
no_agent (4.286 ms) : 4238, 4335
. : milestone, 4286,
iast (9.491 ms) : 9333, 9650
. : milestone, 9491,
iast_FULL (13.818 ms) : 13540, 14095
. : milestone, 13818,
iast_GLOBAL (10.261 ms) : 10076, 10445
. : milestone, 10261,
profiling (8.507 ms) : 8360, 8654
. : milestone, 8507,
tracing (7.867 ms) : 7753, 7981
. : milestone, 7867,
section candidate
no_agent (4.469 ms) : 4418, 4520
. : milestone, 4469,
iast (9.135 ms) : 8981, 9289
. : milestone, 9135,
iast_FULL (13.659 ms) : 13386, 13931
. : milestone, 13659,
iast_GLOBAL (10.38 ms) : 10194, 10565
. : milestone, 10380,
profiling (8.59 ms) : 8460, 8721
. : milestone, 8590,
tracing (7.516 ms) : 7402, 7630
. : milestone, 7516,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section baseline
no_agent (36.648 ms) : 36360, 36937
. : milestone, 36648,
appsec (46.624 ms) : 46203, 47045
. : milestone, 46624,
code_origins (44.131 ms) : 43744, 44518
. : milestone, 44131,
iast (44.339 ms) : 43940, 44739
. : milestone, 44339,
profiling (49.96 ms) : 49490, 50430
. : milestone, 49960,
tracing (45.543 ms) : 45143, 45942
. : milestone, 45543,
section candidate
no_agent (36.067 ms) : 35777, 36358
. : milestone, 36067,
appsec (47.595 ms) : 47179, 48010
. : milestone, 47595,
code_origins (44.578 ms) : 44206, 44950
. : milestone, 44578,
iast (45.834 ms) : 45433, 46235
. : milestone, 45834,
profiling (50.048 ms) : 49516, 50580
. : milestone, 50048,
tracing (45.078 ms) : 44695, 45461
. : milestone, 45078,
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~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1468, 1491
. : milestone, 1479,
appsec (3.669 ms) : 3453, 3886
. : milestone, 3669,
iast (2.203 ms) : 2140, 2266
. : milestone, 2203,
iast_GLOBAL (2.243 ms) : 2180, 2307
. : milestone, 2243,
profiling (2.051 ms) : 2000, 2103
. : milestone, 2051,
tracing (2.01 ms) : 1961, 2058
. : milestone, 2010,
section candidate
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.59 ms) : 3377, 3804
. : milestone, 3590,
iast (2.205 ms) : 2142, 2268
. : milestone, 2205,
iast_GLOBAL (2.247 ms) : 2183, 2310
. : milestone, 2247,
profiling (2.054 ms) : 2003, 2105
. : milestone, 2054,
tracing (2.023 ms) : 1974, 2072
. : milestone, 2023,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~d73f349ab9, baseline=1.53.0-SNAPSHOT~e125ff7b82
dateFormat X
axisFormat %s
section baseline
no_agent (15.537 s) : 15537000, 15537000
. : milestone, 15537000,
appsec (14.959 s) : 14959000, 14959000
. : milestone, 14959000,
iast (18.489 s) : 18489000, 18489000
. : milestone, 18489000,
iast_GLOBAL (18.252 s) : 18252000, 18252000
. : milestone, 18252000,
profiling (15.454 s) : 15454000, 15454000
. : milestone, 15454000,
tracing (15.01 s) : 15010000, 15010000
. : milestone, 15010000,
section candidate
no_agent (15.397 s) : 15397000, 15397000
. : milestone, 15397000,
appsec (14.786 s) : 14786000, 14786000
. : milestone, 14786000,
iast (18.361 s) : 18361000, 18361000
. : milestone, 18361000,
iast_GLOBAL (18.212 s) : 18212000, 18212000
. : milestone, 18212000,
profiling (15.607 s) : 15607000, 15607000
. : milestone, 15607000,
tracing (14.837 s) : 14837000, 14837000
. : milestone, 14837000,
|
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
new HandlerContextKey<>("DatadogSpan"); // same as TracingRequestHandler.SPAN_CONTEXT_KEY | ||
public static final HandlerContextKey<Context> CONTEXT_CONTEXT_KEY = | ||
new HandlerContextKey<>( | ||
"DatadogContext"); // same as TracingRequestHandler.CONTEXT_CONTEXT_KEY |
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.
Would it make sense to have key constants on a single class file to have them all in a single place? It will avoid using string values everywhere
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 does. It feels this would be out of scope this PR... Maybe IDM can pick it up as improvement? WYDT?
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 can be deferred to their backlog
Unknown, | ||
Inbound, | ||
Outbound, | ||
UNKNOWN, |
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.
out of curiosity are we recommending to have uppercase only for enum names?
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.
According the Java’s guideline:
Because they are constants, the names of an enum type's fields are in uppercase letters.
Merging now to prevent conflict with #9383 |
What Does This Do
This PR keeps migrating instrumentations to the Context API
Motivation
Decoupling DSM from Tracing.
This PR will focus on instrumentation that tightly coupled DSM and Tracing to introduce Context tracking instead.
Additional Notes
This PR also rework DSM coding style (enum values in upper-case).
The introduced TODO is a marker for following work with the DSM team.
This is a follow up PR of:
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: [PROJ-IDENT]