-
Notifications
You must be signed in to change notification settings - Fork 293
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
Example of how to group related instrumentations under a single module (AwsSdkModule) #8141
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 4 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1054159
Total [baseline] (8.647 s) : 0, 8646958
Agent [candidate] (1.055 s) : 0, 1054967
Total [candidate] (8.629 s) : 0, 8629293
section iast
Agent [baseline] (1.191 s) : 0, 1190587
Total [baseline] (9.241 s) : 0, 9240692
Agent [candidate] (1.191 s) : 0, 1191229
Total [candidate] (9.256 s) : 0, 9256364
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.186 s) : 0, 1186243
Total [baseline] (9.269 s) : 0, 9269344
Agent [candidate] (1.182 s) : 0, 1181679
Total [candidate] (9.185 s) : 0, 9185180
section iast_TELEMETRY_OFF
Agent [baseline] (1.184 s) : 0, 1183612
Total [baseline] (9.241 s) : 0, 9241031
Agent [candidate] (1.179 s) : 0, 1179480
Total [candidate] (9.237 s) : 0, 9236825
gantt
title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.361 ms) : 0, 714361
BytebuddyAgent [candidate] (713.773 ms) : 0, 713773
GlobalTracer [baseline] (256.734 ms) : 0, 256734
GlobalTracer [candidate] (256.911 ms) : 0, 256911
AppSec [baseline] (55.281 ms) : 0, 55281
AppSec [candidate] (55.265 ms) : 0, 55265
Remote Config [baseline] (726.562 µs) : 0, 727
Remote Config [candidate] (718.33 µs) : 0, 718
Telemetry [baseline] (12.012 ms) : 0, 12012
Telemetry [candidate] (13.17 ms) : 0, 13170
section iast
BytebuddyAgent [baseline] (837.044 ms) : 0, 837044
BytebuddyAgent [candidate] (837.353 ms) : 0, 837353
GlobalTracer [baseline] (248.522 ms) : 0, 248522
GlobalTracer [candidate] (248.877 ms) : 0, 248877
AppSec [baseline] (58.758 ms) : 0, 58758
AppSec [candidate] (58.749 ms) : 0, 58749
IAST [baseline] (21.786 ms) : 0, 21786
IAST [candidate] (21.638 ms) : 0, 21638
Remote Config [baseline] (680.652 µs) : 0, 681
Remote Config [candidate] (735.424 µs) : 0, 735
Telemetry [baseline] (8.703 ms) : 0, 8703
Telemetry [candidate] (8.712 ms) : 0, 8712
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.672 ms) : 0, 832672
BytebuddyAgent [candidate] (830.283 ms) : 0, 830283
GlobalTracer [baseline] (248.923 ms) : 0, 248923
GlobalTracer [candidate] (247.5 ms) : 0, 247500
AppSec [baseline] (58.667 ms) : 0, 58667
AppSec [candidate] (58.194 ms) : 0, 58194
IAST [baseline] (21.616 ms) : 0, 21616
IAST [candidate] (21.453 ms) : 0, 21453
Remote Config [baseline] (668.77 µs) : 0, 669
Remote Config [candidate] (649.697 µs) : 0, 650
Telemetry [baseline] (8.609 ms) : 0, 8609
Telemetry [candidate] (8.589 ms) : 0, 8589
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (833.337 ms) : 0, 833337
BytebuddyAgent [candidate] (828.773 ms) : 0, 828773
GlobalTracer [baseline] (247.195 ms) : 0, 247195
GlobalTracer [candidate] (247.276 ms) : 0, 247276
AppSec [baseline] (57.96 ms) : 0, 57960
AppSec [candidate] (58.066 ms) : 0, 58066
IAST [baseline] (20.924 ms) : 0, 20924
IAST [candidate] (21.118 ms) : 0, 21118
Remote Config [baseline] (646.935 µs) : 0, 647
Remote Config [candidate] (675.213 µs) : 0, 675
Telemetry [baseline] (8.4 ms) : 0, 8400
Telemetry [candidate] (8.508 ms) : 0, 8508
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055642
Total [baseline] (10.496 s) : 0, 10495552
Agent [candidate] (1.063 s) : 0, 1062719
Total [candidate] (10.469 s) : 0, 10469381
section appsec
Agent [baseline] (1.191 s) : 0, 1190696
Total [baseline] (10.737 s) : 0, 10736998
Agent [candidate] (1.196 s) : 0, 1195660
Total [candidate] (10.746 s) : 0, 10746313
section iast
Agent [baseline] (1.181 s) : 0, 1180953
Total [baseline] (11.012 s) : 0, 11011881
Agent [candidate] (1.183 s) : 0, 1183171
Total [candidate] (11.011 s) : 0, 11010596
section profiling
Agent [baseline] (1.283 s) : 0, 1283008
Total [baseline] (10.842 s) : 0, 10841728
Agent [candidate] (1.275 s) : 0, 1274778
Total [candidate] (10.819 s) : 0, 10819239
gantt
title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.268 ms) : 0, 715268
BytebuddyAgent [candidate] (719.122 ms) : 0, 719122
GlobalTracer [baseline] (257.019 ms) : 0, 257019
GlobalTracer [candidate] (260.21 ms) : 0, 260210
AppSec [baseline] (55.41 ms) : 0, 55410
AppSec [candidate] (55.965 ms) : 0, 55965
Remote Config [baseline] (722.375 µs) : 0, 722
Remote Config [candidate] (740.044 µs) : 0, 740
Telemetry [baseline] (12.128 ms) : 0, 12128
Telemetry [candidate] (11.494 ms) : 0, 11494
section appsec
BytebuddyAgent [baseline] (731.71 ms) : 0, 731710
BytebuddyAgent [candidate] (735.795 ms) : 0, 735795
GlobalTracer [baseline] (254.236 ms) : 0, 254236
GlobalTracer [candidate] (255.18 ms) : 0, 255180
AppSec [baseline] (171.266 ms) : 0, 171266
AppSec [candidate] (170.835 ms) : 0, 170835
Remote Config [baseline] (664.425 µs) : 0, 664
Remote Config [candidate] (659.582 µs) : 0, 660
Telemetry [baseline] (8.038 ms) : 0, 8038
Telemetry [candidate] (8.0 ms) : 0, 8000
IAST [baseline] (19.513 ms) : 0, 19513
IAST [candidate] (20.089 ms) : 0, 20089
section iast
BytebuddyAgent [baseline] (830.171 ms) : 0, 830171
BytebuddyAgent [candidate] (831.338 ms) : 0, 831338
GlobalTracer [baseline] (246.877 ms) : 0, 246877
GlobalTracer [candidate] (247.515 ms) : 0, 247515
AppSec [baseline] (58.301 ms) : 0, 58301
AppSec [candidate] (58.398 ms) : 0, 58398
Remote Config [baseline] (655.653 µs) : 0, 656
Remote Config [candidate] (658.67 µs) : 0, 659
Telemetry [baseline] (8.573 ms) : 0, 8573
Telemetry [candidate] (8.693 ms) : 0, 8693
IAST [baseline] (21.317 ms) : 0, 21317
IAST [candidate] (21.479 ms) : 0, 21479
section profiling
BytebuddyAgent [baseline] (708.348 ms) : 0, 708348
BytebuddyAgent [candidate] (702.63 ms) : 0, 702630
GlobalTracer [baseline] (373.507 ms) : 0, 373507
GlobalTracer [candidate] (371.657 ms) : 0, 371657
AppSec [baseline] (54.148 ms) : 0, 54148
AppSec [candidate] (54.117 ms) : 0, 54117
Remote Config [baseline] (659.814 µs) : 0, 660
Remote Config [candidate] (672.093 µs) : 0, 672
Telemetry [baseline] (7.774 ms) : 0, 7774
Telemetry [candidate] (7.83 ms) : 0, 7830
ProfilingAgent [baseline] (96.308 ms) : 0, 96308
ProfilingAgent [candidate] (95.88 ms) : 0, 95880
Profiling [baseline] (96.331 ms) : 0, 96331
Profiling [candidate] (95.904 ms) : 0, 95904
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section baseline
no_agent (376.149 µs) : 356, 396
. : milestone, 376,
iast (484.209 µs) : 463, 506
. : milestone, 484,
iast_FULL (653.161 µs) : 632, 675
. : milestone, 653,
iast_GLOBAL (524.817 µs) : 502, 547
. : milestone, 525,
iast_HARDCODED_SECRET_DISABLED (489.436 µs) : 468, 511
. : milestone, 489,
iast_INACTIVE (448.329 µs) : 427, 470
. : milestone, 448,
iast_TELEMETRY_OFF (478.941 µs) : 457, 501
. : milestone, 479,
tracing (446.437 µs) : 425, 468
. : milestone, 446,
section candidate
no_agent (371.226 µs) : 352, 391
. : milestone, 371,
iast (488.451 µs) : 467, 510
. : milestone, 488,
iast_FULL (649.234 µs) : 628, 671
. : milestone, 649,
iast_GLOBAL (515.353 µs) : 494, 537
. : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (499.659 µs) : 478, 521
. : milestone, 500,
iast_INACTIVE (450.112 µs) : 429, 471
. : milestone, 450,
iast_TELEMETRY_OFF (477.496 µs) : 456, 499
. : milestone, 477,
tracing (444.927 µs) : 424, 465
. : milestone, 445,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section baseline
no_agent (1.348 ms) : 1329, 1367
. : milestone, 1348,
appsec (1.762 ms) : 1738, 1785
. : milestone, 1762,
appsec_no_iast (1.763 ms) : 1739, 1787
. : milestone, 1763,
iast (1.499 ms) : 1477, 1522
. : milestone, 1499,
profiling (1.516 ms) : 1492, 1539
. : milestone, 1516,
tracing (1.496 ms) : 1472, 1520
. : milestone, 1496,
section candidate
no_agent (1.35 ms) : 1331, 1369
. : milestone, 1350,
appsec (1.732 ms) : 1709, 1755
. : milestone, 1732,
appsec_no_iast (1.717 ms) : 1693, 1741
. : milestone, 1717,
iast (1.461 ms) : 1438, 1484
. : milestone, 1461,
profiling (1.494 ms) : 1470, 1517
. : milestone, 1494,
tracing (1.477 ms) : 1451, 1502
. : milestone, 1477,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section baseline
no_agent (15.339 s) : 15339000, 15339000
. : milestone, 15339000,
appsec (15.037 s) : 15037000, 15037000
. : milestone, 15037000,
iast (18.689 s) : 18689000, 18689000
. : milestone, 18689000,
iast_GLOBAL (17.948 s) : 17948000, 17948000
. : milestone, 17948000,
profiling (15.598 s) : 15598000, 15598000
. : milestone, 15598000,
tracing (14.982 s) : 14982000, 14982000
. : milestone, 14982000,
section candidate
no_agent (15.455 s) : 15455000, 15455000
. : milestone, 15455000,
appsec (15.068 s) : 15068000, 15068000
. : milestone, 15068000,
iast (18.57 s) : 18570000, 18570000
. : milestone, 18570000,
iast_GLOBAL (18.175 s) : 18175000, 18175000
. : milestone, 18175000,
profiling (15.01 s) : 15010000, 15010000
. : milestone, 15010000,
tracing (14.891 s) : 14891000, 14891000
. : milestone, 14891000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~b2cd24fc26, baseline=1.45.0-SNAPSHOT~a9dc3bec93
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (2.338 ms) : 2297, 2379
. : milestone, 2338,
iast (2.09 ms) : 2038, 2143
. : milestone, 2090,
iast_GLOBAL (2.135 ms) : 2081, 2188
. : milestone, 2135,
profiling (1.949 ms) : 1908, 1991
. : milestone, 1949,
tracing (1.923 ms) : 1883, 1964
. : milestone, 1923,
section candidate
no_agent (1.472 ms) : 1460, 1484
. : milestone, 1472,
appsec (2.352 ms) : 2310, 2394
. : milestone, 2352,
iast (2.095 ms) : 2042, 2148
. : milestone, 2095,
iast_GLOBAL (2.125 ms) : 2072, 2178
. : milestone, 2125,
profiling (1.971 ms) : 1928, 2015
. : milestone, 1971,
tracing (1.925 ms) : 1885, 1965
. : milestone, 1925,
|
bc015d8
to
674a513
Compare
public final class AwsSdkModule extends InstrumenterModule.Tracing { | ||
|
||
public AwsSdkModule() { | ||
super("aws-sdk"); |
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.
Sometimes we have different instrumentation names if we want to turn off a specific advice. I understand that's handy to have the group decide for what activate or not. How does it play if we need to disable a specific one? (I was thinking about spring-path-filter
). Can this name be still declared on the Instrumentation (extending InstrumenterModule.Tracing
) or that kind of if
should be implemented rather in typeInstrumentations
method?
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.
You can only set the integration name on the InstrumenterModule
- if you want to have an instrumentation under a different integration name then it's likely independent and deserves its own InstrumenterModule
(i.e. itself if it only covers one instrumentation.)
Otherwise if you want instrumentations to share a module, but still be individually enabled/disabled then implement that logic inside typeInstrumentations()
- that could involve checking which products are enabled, or using the InstrumenterConfig.isIntegrationEnabled(...)
method. This should be a relatively rare situation, because typically instrumentations grouped together under a module should be considered as a logical unit.
674a513
to
c6ccd4d
Compare
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.
Thanks for having provided that example. I'm interested in knowing if there are plans to separate instrumentation modules and instrumentation with advices in the build or if they will stay on the same gradle modules
We have discussed the advantages of that separation in the past, but we don't have any firm timeline yet. |
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.
LGTM
c6ccd4d
to
b2cd24f
Compare
What Does This Do
Provides an example of how to group related instrumentations under a single module.
Motivation
Grouping related instrumentations reduces repeated declarations of helpers and context store use.
Grouping also makes it easier to re-use instrumentations.
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: APMAPI-860