-
Notifications
You must be signed in to change notification settings - Fork 319
Expose Context.empty() as building block for creating custom root contexts #8575
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…texts This supports custom ContextManagers that want to define their own root context without needing to expose all the different context implementations. They can start with Context.empty() and add any elements they want, storing the final context as a constant so it can be supplied as Context.root()
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 5 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1051189
Total [baseline] (8.678 s) : 0, 8677653
Agent [candidate] (1.052 s) : 0, 1052387
Total [candidate] (8.712 s) : 0, 8711554
section iast
Agent [baseline] (1.186 s) : 0, 1185694
Total [baseline] (9.236 s) : 0, 9236482
Agent [candidate] (1.172 s) : 0, 1171560
Total [candidate] (9.284 s) : 0, 9283608
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.169 s) : 0, 1169048
Total [baseline] (9.163 s) : 0, 9163148
Agent [candidate] (1.178 s) : 0, 1178403
Total [candidate] (9.194 s) : 0, 9193885
section iast_TELEMETRY_OFF
Agent [baseline] (1.18 s) : 0, 1180181
Total [baseline] (9.216 s) : 0, 9216076
Agent [candidate] (1.169 s) : 0, 1169138
Total [candidate] (9.233 s) : 0, 9233013
gantt
title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (726.385 ms) : 0, 726385
BytebuddyAgent [candidate] (725.284 ms) : 0, 725284
GlobalTracer [baseline] (239.824 ms) : 0, 239824
GlobalTracer [candidate] (241.548 ms) : 0, 241548
AppSec [baseline] (54.719 ms) : 0, 54719
AppSec [candidate] (55.168 ms) : 0, 55168
Remote Config [baseline] (682.257 µs) : 0, 682
Remote Config [candidate] (695.823 µs) : 0, 696
Telemetry [baseline] (14.266 ms) : 0, 14266
Telemetry [candidate] (14.394 ms) : 0, 14394
section iast
BytebuddyAgent [baseline] (850.009 ms) : 0, 850009
BytebuddyAgent [candidate] (838.548 ms) : 0, 838548
GlobalTracer [baseline] (231.101 ms) : 0, 231101
GlobalTracer [candidate] (229.544 ms) : 0, 229544
IAST [baseline] (23.163 ms) : 0, 23163
IAST [candidate] (22.695 ms) : 0, 22695
AppSec [baseline] (56.655 ms) : 0, 56655
AppSec [candidate] (56.27 ms) : 0, 56270
Remote Config [baseline] (603.235 µs) : 0, 603
Remote Config [candidate] (607.505 µs) : 0, 608
Telemetry [baseline] (8.827 ms) : 0, 8827
Telemetry [candidate] (8.71 ms) : 0, 8710
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (836.209 ms) : 0, 836209
BytebuddyAgent [candidate] (844.071 ms) : 0, 844071
GlobalTracer [baseline] (230.02 ms) : 0, 230020
GlobalTracer [candidate] (230.341 ms) : 0, 230341
IAST [baseline] (22.572 ms) : 0, 22572
IAST [candidate] (23.799 ms) : 0, 23799
AppSec [baseline] (55.909 ms) : 0, 55909
AppSec [candidate] (55.467 ms) : 0, 55467
Remote Config [baseline] (594.394 µs) : 0, 594
Remote Config [candidate] (621.126 µs) : 0, 621
Telemetry [baseline] (8.556 ms) : 0, 8556
Telemetry [candidate] (8.757 ms) : 0, 8757
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (844.475 ms) : 0, 844475
BytebuddyAgent [candidate] (834.749 ms) : 0, 834749
GlobalTracer [baseline] (231.85 ms) : 0, 231850
GlobalTracer [candidate] (231.367 ms) : 0, 231367
IAST [baseline] (22.737 ms) : 0, 22737
IAST [candidate] (22.5 ms) : 0, 22500
AppSec [baseline] (56.448 ms) : 0, 56448
AppSec [candidate] (56.028 ms) : 0, 56028
Remote Config [baseline] (605.332 µs) : 0, 605
Remote Config [candidate] (611.264 µs) : 0, 611
Telemetry [baseline] (8.708 ms) : 0, 8708
Telemetry [candidate] (8.648 ms) : 0, 8648
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1044316
Total [baseline] (10.426 s) : 0, 10425509
Agent [candidate] (1.047 s) : 0, 1047050
Total [candidate] (10.503 s) : 0, 10503379
section appsec
Agent [baseline] (1.19 s) : 0, 1189848
Total [baseline] (10.751 s) : 0, 10751320
Agent [candidate] (1.188 s) : 0, 1188442
Total [candidate] (10.764 s) : 0, 10763712
section iast
Agent [baseline] (1.18 s) : 0, 1180047
Total [baseline] (11.037 s) : 0, 11036696
Agent [candidate] (1.182 s) : 0, 1182399
Total [candidate] (11.002 s) : 0, 11002112
section profiling
Agent [baseline] (1.263 s) : 0, 1263075
Total [baseline] (10.856 s) : 0, 10856393
Agent [candidate] (1.258 s) : 0, 1258483
Total [candidate] (10.854 s) : 0, 10853787
gantt
title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (721.857 ms) : 0, 721857
BytebuddyAgent [candidate] (723.242 ms) : 0, 723242
GlobalTracer [baseline] (239.194 ms) : 0, 239194
GlobalTracer [candidate] (240.782 ms) : 0, 240782
AppSec [baseline] (54.541 ms) : 0, 54541
AppSec [candidate] (54.825 ms) : 0, 54825
Remote Config [baseline] (683.007 µs) : 0, 683
Remote Config [candidate] (691.541 µs) : 0, 692
Telemetry [baseline] (12.808 ms) : 0, 12808
Telemetry [candidate] (12.269 ms) : 0, 12269
section appsec
BytebuddyAgent [baseline] (741.673 ms) : 0, 741673
BytebuddyAgent [candidate] (739.871 ms) : 0, 739871
GlobalTracer [baseline] (236.93 ms) : 0, 236930
GlobalTracer [candidate] (237.462 ms) : 0, 237462
AppSec [baseline] (176.102 ms) : 0, 176102
AppSec [candidate] (175.62 ms) : 0, 175620
Remote Config [baseline] (666.503 µs) : 0, 667
Remote Config [candidate] (663.839 µs) : 0, 664
Telemetry [baseline] (8.324 ms) : 0, 8324
Telemetry [candidate] (8.734 ms) : 0, 8734
IAST [baseline] (21.608 ms) : 0, 21608
IAST [candidate] (21.653 ms) : 0, 21653
section iast
BytebuddyAgent [baseline] (844.983 ms) : 0, 844983
BytebuddyAgent [candidate] (846.659 ms) : 0, 846659
GlobalTracer [baseline] (230.987 ms) : 0, 230987
GlobalTracer [candidate] (231.385 ms) : 0, 231385
AppSec [baseline] (56.371 ms) : 0, 56371
AppSec [candidate] (56.539 ms) : 0, 56539
Remote Config [baseline] (604.307 µs) : 0, 604
Remote Config [candidate] (610.637 µs) : 0, 611
Telemetry [baseline] (8.779 ms) : 0, 8779
Telemetry [candidate] (8.77 ms) : 0, 8770
IAST [baseline] (23.06 ms) : 0, 23060
IAST [candidate] (23.05 ms) : 0, 23050
section profiling
ProfilingAgent [baseline] (96.69 ms) : 0, 96690
ProfilingAgent [candidate] (96.086 ms) : 0, 96086
BytebuddyAgent [baseline] (711.159 ms) : 0, 711159
BytebuddyAgent [candidate] (709.021 ms) : 0, 709021
GlobalTracer [baseline] (350.319 ms) : 0, 350319
GlobalTracer [candidate] (349.674 ms) : 0, 349674
AppSec [baseline] (54.25 ms) : 0, 54250
AppSec [candidate] (53.302 ms) : 0, 53302
Remote Config [baseline] (681.457 µs) : 0, 681
Remote Config [candidate] (665.796 µs) : 0, 666
Telemetry [baseline] (8.974 ms) : 0, 8974
Telemetry [candidate] (9.013 ms) : 0, 9013
Profiling [baseline] (96.715 ms) : 0, 96715
Profiling [candidate] (96.11 ms) : 0, 96110
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 14 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section baseline
no_agent (384.112 µs) : 364, 404
. : milestone, 384,
iast (518.608 µs) : 496, 541
. : milestone, 519,
iast_FULL (739.959 µs) : 718, 762
. : milestone, 740,
iast_GLOBAL (565.601 µs) : 543, 588
. : milestone, 566,
iast_HARDCODED_SECRET_DISABLED (520.242 µs) : 499, 542
. : milestone, 520,
iast_INACTIVE (466.731 µs) : 446, 488
. : milestone, 467,
iast_TELEMETRY_OFF (515.657 µs) : 494, 537
. : milestone, 516,
tracing (464.218 µs) : 444, 485
. : milestone, 464,
section candidate
no_agent (384.509 µs) : 364, 405
. : milestone, 385,
iast (515.652 µs) : 494, 538
. : milestone, 516,
iast_FULL (734.017 µs) : 712, 756
. : milestone, 734,
iast_GLOBAL (562.557 µs) : 540, 585
. : milestone, 563,
iast_HARDCODED_SECRET_DISABLED (524.04 µs) : 502, 546
. : milestone, 524,
iast_INACTIVE (466.722 µs) : 446, 488
. : milestone, 467,
iast_TELEMETRY_OFF (507.92 µs) : 486, 530
. : milestone, 508,
tracing (464.768 µs) : 443, 486
. : milestone, 465,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section baseline
no_agent (1.37 ms) : 1350, 1390
. : milestone, 1370,
appsec (1.728 ms) : 1704, 1752
. : milestone, 1728,
appsec_no_iast (1.754 ms) : 1730, 1779
. : milestone, 1754,
code_origins (1.71 ms) : 1683, 1736
. : milestone, 1710,
iast (1.512 ms) : 1489, 1536
. : milestone, 1512,
profiling (1.545 ms) : 1520, 1570
. : milestone, 1545,
tracing (1.488 ms) : 1463, 1513
. : milestone, 1488,
section candidate
no_agent (1.356 ms) : 1337, 1376
. : milestone, 1356,
appsec (1.741 ms) : 1717, 1765
. : milestone, 1741,
appsec_no_iast (1.759 ms) : 1735, 1782
. : milestone, 1759,
code_origins (1.7 ms) : 1673, 1726
. : milestone, 1700,
iast (1.52 ms) : 1496, 1545
. : milestone, 1520,
profiling (1.579 ms) : 1554, 1604
. : milestone, 1579,
tracing (1.491 ms) : 1466, 1517
. : milestone, 1491,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section baseline
no_agent (14.957 s) : 14957000, 14957000
. : milestone, 14957000,
appsec (14.845 s) : 14845000, 14845000
. : milestone, 14845000,
iast (18.724 s) : 18724000, 18724000
. : milestone, 18724000,
iast_GLOBAL (18.183 s) : 18183000, 18183000
. : milestone, 18183000,
profiling (15.117 s) : 15117000, 15117000
. : milestone, 15117000,
tracing (14.871 s) : 14871000, 14871000
. : milestone, 14871000,
section candidate
no_agent (14.977 s) : 14977000, 14977000
. : milestone, 14977000,
appsec (15.135 s) : 15135000, 15135000
. : milestone, 15135000,
iast (18.185 s) : 18185000, 18185000
. : milestone, 18185000,
iast_GLOBAL (17.983 s) : 17983000, 17983000
. : milestone, 17983000,
profiling (14.949 s) : 14949000, 14949000
. : milestone, 14949000,
tracing (15.079 s) : 15079000, 15079000
. : milestone, 15079000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~46b5f4a24d, baseline=1.48.0-SNAPSHOT~5fb00dc125
dateFormat X
axisFormat %s
section baseline
no_agent (1.483 ms) : 1472, 1495
. : milestone, 1483,
appsec (2.364 ms) : 2320, 2408
. : milestone, 2364,
iast (2.128 ms) : 2071, 2184
. : milestone, 2128,
iast_GLOBAL (2.186 ms) : 2130, 2242
. : milestone, 2186,
profiling (2.454 ms) : 2279, 2630
. : milestone, 2454,
tracing (1.959 ms) : 1917, 2001
. : milestone, 1959,
section candidate
no_agent (1.482 ms) : 1470, 1493
. : milestone, 1482,
appsec (2.362 ms) : 2318, 2406
. : milestone, 2362,
iast (2.133 ms) : 2077, 2189
. : milestone, 2133,
iast_GLOBAL (2.174 ms) : 2118, 2230
. : milestone, 2174,
profiling (2.011 ms) : 1965, 2057
. : milestone, 2011,
tracing (1.962 ms) : 1919, 2005
. : milestone, 1962,
|
amarziali
approved these changes
Mar 17, 2025
mtoffl01
pushed a commit
that referenced
this pull request
Mar 24, 2025
…texts (#8575) This supports custom ContextManagers that want to define their own root context without needing to expose all the different context implementations. They can start with Context.empty() and add any elements they want, storing the final context as a constant so it can be supplied as Context.root()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp: core
Tracer core
tag: no release notes
Changes to exclude from release notes
type: refactoring
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This supports custom
ContextManagers that want to define their own root context without needing to expose all the different context implementations. They can start withContext.empty()and add any elements they want, storing the final context as a constant so it can be supplied asContext.root()Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APMAPI-981