-
Notifications
You must be signed in to change notification settings - Fork 292
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
Fix Kafka lag instrumentation for version 2.7 of Kafka #7941
Fix Kafka lag instrumentation for version 2.7 of Kafka #7941
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.083 s) : 0, 1083290
Total [baseline] (8.631 s) : 0, 8631331
Agent [candidate] (1.082 s) : 0, 1081523
Total [candidate] (8.57 s) : 0, 8570423
section iast
Agent [baseline] (1.206 s) : 0, 1206388
Total [baseline] (9.141 s) : 0, 9141196
Agent [candidate] (1.217 s) : 0, 1217329
Total [candidate] (9.173 s) : 0, 9173104
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.205 s) : 0, 1205405
Total [baseline] (9.106 s) : 0, 9106427
Agent [candidate] (1.209 s) : 0, 1208628
Total [candidate] (9.144 s) : 0, 9143564
section iast_TELEMETRY_OFF
Agent [baseline] (1.206 s) : 0, 1206207
Total [baseline] (9.138 s) : 0, 9137653
Agent [candidate] (1.206 s) : 0, 1205619
Total [candidate] (9.191 s) : 0, 9191074
gantt
title insecure-bank - break down per module: candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (688.022 ms) : 0, 688022
BytebuddyAgent [candidate] (687.697 ms) : 0, 687697
GlobalTracer [baseline] (316.291 ms) : 0, 316291
GlobalTracer [candidate] (315.84 ms) : 0, 315840
AppSec [baseline] (54.539 ms) : 0, 54539
AppSec [candidate] (54.341 ms) : 0, 54341
Remote Config [baseline] (691.589 µs) : 0, 692
Remote Config [candidate] (674.511 µs) : 0, 675
Telemetry [baseline] (9.991 ms) : 0, 9991
Telemetry [candidate] (9.231 ms) : 0, 9231
section iast
BytebuddyAgent [baseline] (802.403 ms) : 0, 802403
BytebuddyAgent [candidate] (809.692 ms) : 0, 809692
GlobalTracer [baseline] (304.338 ms) : 0, 304338
GlobalTracer [candidate] (307.444 ms) : 0, 307444
AppSec [baseline] (57.315 ms) : 0, 57315
AppSec [candidate] (57.892 ms) : 0, 57892
IAST [baseline] (20.536 ms) : 0, 20536
IAST [candidate] (20.451 ms) : 0, 20451
Remote Config [baseline] (620.273 µs) : 0, 620
Remote Config [candidate] (607.246 µs) : 0, 607
Telemetry [baseline] (7.442 ms) : 0, 7442
Telemetry [candidate] (7.37 ms) : 0, 7370
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (800.772 ms) : 0, 800772
BytebuddyAgent [candidate] (803.036 ms) : 0, 803036
GlobalTracer [baseline] (304.411 ms) : 0, 304411
GlobalTracer [candidate] (305.909 ms) : 0, 305909
AppSec [baseline] (56.041 ms) : 0, 56041
AppSec [candidate] (57.305 ms) : 0, 57305
IAST [baseline] (22.317 ms) : 0, 22317
IAST [candidate] (20.558 ms) : 0, 20558
Remote Config [baseline] (634.845 µs) : 0, 635
Remote Config [candidate] (640.234 µs) : 0, 640
Telemetry [baseline] (7.508 ms) : 0, 7508
Telemetry [candidate] (7.446 ms) : 0, 7446
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (800.861 ms) : 0, 800861
BytebuddyAgent [candidate] (800.506 ms) : 0, 800506
GlobalTracer [baseline] (305.509 ms) : 0, 305509
GlobalTracer [candidate] (304.924 ms) : 0, 304924
AppSec [baseline] (57.894 ms) : 0, 57894
AppSec [candidate] (57.328 ms) : 0, 57328
IAST [baseline] (20.192 ms) : 0, 20192
IAST [candidate] (21.122 ms) : 0, 21122
Remote Config [baseline] (611.407 µs) : 0, 611
Remote Config [candidate] (618.894 µs) : 0, 619
Telemetry [baseline] (7.371 ms) : 0, 7371
Telemetry [candidate] (7.381 ms) : 0, 7381
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.09 s) : 0, 1090495
Total [baseline] (10.467 s) : 0, 10467002
Agent [candidate] (1.081 s) : 0, 1080679
Total [candidate] (10.41 s) : 0, 10409732
section appsec
Agent [baseline] (1.221 s) : 0, 1221224
Total [baseline] (10.7 s) : 0, 10700092
Agent [candidate] (1.223 s) : 0, 1223444
Total [candidate] (10.672 s) : 0, 10671929
section iast
Agent [baseline] (1.208 s) : 0, 1208197
Total [baseline] (10.917 s) : 0, 10917461
Agent [candidate] (1.211 s) : 0, 1210905
Total [candidate] (11.011 s) : 0, 11011281
section profiling
Agent [baseline] (1.284 s) : 0, 1283696
Total [baseline] (10.802 s) : 0, 10802055
Agent [candidate] (1.289 s) : 0, 1288788
Total [candidate] (10.776 s) : 0, 10776392
gantt
title petclinic - break down per module: candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.574 ms) : 0, 692574
BytebuddyAgent [candidate] (687.091 ms) : 0, 687091
GlobalTracer [baseline] (318.199 ms) : 0, 318199
GlobalTracer [candidate] (316.379 ms) : 0, 316379
AppSec [baseline] (54.459 ms) : 0, 54459
AppSec [candidate] (54.285 ms) : 0, 54285
Remote Config [baseline] (679.263 µs) : 0, 679
Remote Config [candidate] (674.617 µs) : 0, 675
Telemetry [baseline] (10.751 ms) : 0, 10751
Telemetry [candidate] (8.51 ms) : 0, 8510
section appsec
BytebuddyAgent [baseline] (706.47 ms) : 0, 706470
BytebuddyAgent [candidate] (709.646 ms) : 0, 709646
GlobalTracer [baseline] (316.195 ms) : 0, 316195
GlobalTracer [candidate] (315.568 ms) : 0, 315568
AppSec [baseline] (165.937 ms) : 0, 165937
AppSec [candidate] (165.152 ms) : 0, 165152
IAST [baseline] (20.759 ms) : 0, 20759
IAST [candidate] (20.14 ms) : 0, 20140
Remote Config [baseline] (641.725 µs) : 0, 642
Remote Config [candidate] (648.098 µs) : 0, 648
Telemetry [baseline] (7.86 ms) : 0, 7860
Telemetry [candidate] (8.548 ms) : 0, 8548
section iast
BytebuddyAgent [baseline] (803.433 ms) : 0, 803433
BytebuddyAgent [candidate] (804.402 ms) : 0, 804402
GlobalTracer [baseline] (305.328 ms) : 0, 305328
GlobalTracer [candidate] (305.582 ms) : 0, 305582
AppSec [baseline] (56.257 ms) : 0, 56257
AppSec [candidate] (57.455 ms) : 0, 57455
IAST [baseline] (21.418 ms) : 0, 21418
IAST [candidate] (21.522 ms) : 0, 21522
Remote Config [baseline] (610.343 µs) : 0, 610
Remote Config [candidate] (615.374 µs) : 0, 615
Telemetry [baseline] (7.424 ms) : 0, 7424
Telemetry [candidate] (7.587 ms) : 0, 7587
section profiling
BytebuddyAgent [baseline] (685.411 ms) : 0, 685411
BytebuddyAgent [candidate] (686.256 ms) : 0, 686256
GlobalTracer [baseline] (398.86 ms) : 0, 398860
GlobalTracer [candidate] (402.025 ms) : 0, 402025
AppSec [baseline] (54.692 ms) : 0, 54692
AppSec [candidate] (55.098 ms) : 0, 55098
Remote Config [baseline] (663.547 µs) : 0, 664
Remote Config [candidate] (679.12 µs) : 0, 679
Telemetry [baseline] (12.747 ms) : 0, 12747
Telemetry [candidate] (10.662 ms) : 0, 10662
ProfilingAgent [baseline] (92.13 ms) : 0, 92130
ProfilingAgent [candidate] (94.791 ms) : 0, 94791
Profiling [baseline] (92.154 ms) : 0, 92154
Profiling [candidate] (94.815 ms) : 0, 94815
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section baseline
no_agent (373.23 µs) : 353, 393
. : milestone, 373,
iast (500.079 µs) : 478, 522
. : milestone, 500,
iast_FULL (646.361 µs) : 625, 668
. : milestone, 646,
iast_GLOBAL (517.923 µs) : 496, 540
. : milestone, 518,
iast_HARDCODED_SECRET_DISABLED (491.44 µs) : 470, 513
. : milestone, 491,
iast_INACTIVE (450.956 µs) : 430, 472
. : milestone, 451,
iast_TELEMETRY_OFF (470.289 µs) : 449, 491
. : milestone, 470,
tracing (446.313 µs) : 425, 467
. : milestone, 446,
section candidate
no_agent (371.889 µs) : 351, 393
. : milestone, 372,
iast (481.968 µs) : 460, 503
. : milestone, 482,
iast_FULL (643.034 µs) : 622, 664
. : milestone, 643,
iast_GLOBAL (517.892 µs) : 495, 541
. : milestone, 518,
iast_HARDCODED_SECRET_DISABLED (481.736 µs) : 461, 503
. : milestone, 482,
iast_INACTIVE (449.232 µs) : 428, 470
. : milestone, 449,
iast_TELEMETRY_OFF (475.028 µs) : 454, 497
. : milestone, 475,
tracing (446.244 µs) : 424, 468
. : milestone, 446,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section baseline
no_agent (1.341 ms) : 1321, 1361
. : milestone, 1341,
appsec (1.738 ms) : 1714, 1763
. : milestone, 1738,
appsec_no_iast (1.716 ms) : 1691, 1741
. : milestone, 1716,
iast (1.484 ms) : 1462, 1505
. : milestone, 1484,
profiling (1.534 ms) : 1510, 1558
. : milestone, 1534,
tracing (1.478 ms) : 1454, 1502
. : milestone, 1478,
section candidate
no_agent (1.342 ms) : 1321, 1362
. : milestone, 1342,
appsec (1.725 ms) : 1701, 1750
. : milestone, 1725,
appsec_no_iast (1.749 ms) : 1725, 1773
. : milestone, 1749,
iast (1.488 ms) : 1467, 1510
. : milestone, 1488,
profiling (1.487 ms) : 1464, 1510
. : milestone, 1487,
tracing (1.473 ms) : 1446, 1501
. : milestone, 1473,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (2.341 ms) : 2300, 2382
. : milestone, 2341,
iast (2.085 ms) : 2033, 2137
. : milestone, 2085,
iast_GLOBAL (2.122 ms) : 2070, 2175
. : milestone, 2122,
profiling (1.948 ms) : 1906, 1990
. : milestone, 1948,
tracing (1.925 ms) : 1885, 1965
. : milestone, 1925,
section candidate
no_agent (1.467 ms) : 1456, 1479
. : milestone, 1467,
appsec (2.356 ms) : 2314, 2397
. : milestone, 2356,
iast (2.077 ms) : 2025, 2129
. : milestone, 2077,
iast_GLOBAL (2.114 ms) : 2062, 2165
. : milestone, 2114,
profiling (1.936 ms) : 1893, 1978
. : milestone, 1936,
tracing (1.929 ms) : 1889, 1969
. : milestone, 1929,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~06e92093a6, baseline=1.43.0-SNAPSHOT~ea008a2aad
dateFormat X
axisFormat %s
section baseline
no_agent (15.473 s) : 15473000, 15473000
. : milestone, 15473000,
appsec (15.065 s) : 15065000, 15065000
. : milestone, 15065000,
iast (18.451 s) : 18451000, 18451000
. : milestone, 18451000,
iast_GLOBAL (18.535 s) : 18535000, 18535000
. : milestone, 18535000,
profiling (15.179 s) : 15179000, 15179000
. : milestone, 15179000,
tracing (14.892 s) : 14892000, 14892000
. : milestone, 14892000,
section candidate
no_agent (15.526 s) : 15526000, 15526000
. : milestone, 15526000,
appsec (15.272 s) : 15272000, 15272000
. : milestone, 15272000,
iast (18.819 s) : 18819000, 18819000
. : milestone, 18819000,
iast_GLOBAL (17.952 s) : 17952000, 17952000
. : milestone, 17952000,
profiling (15.125 s) : 15125000, 15125000
. : milestone, 15125000,
tracing (15.291 s) : 15291000, 15291000
. : milestone, 15291000,
|
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
|
27a4688
to
e3e573d
Compare
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
@@ -38,11 +38,8 @@ dependencies { | |||
testImplementation(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.10') | |||
|
|||
// Include latest version of kafka itself along with latest version of client libs. | |||
// This seems to help with jar compatibility hell. | |||
latestDepTestImplementation group: 'org.apache.kafka', name: 'kafka_2.13', version: '2.+' |
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.
Not sure I understand, why are we removing these? Was this just always flaky?
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.
These were requiring different versions of kafka-clients. So it was not testing with the versions listed bellow.
Now, the versions it's testing for are more clearly defined.
latestDepTestImplementation group: 'org.apache.kafka', name: 'kafka-clients', version: '2.+' | ||
// latest depending to kafka client 2.x -> to be fixed when this instrumentation will test 3.x as well | ||
latestDepTestImplementation group: 'io.projectreactor.kafka', name: 'reactor-kafka', version: '1.3.21' |
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.
Do we plan on bringing the reactor tests back?
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 don't know, they have been disabled for 2 years as far as I understand, so I prefer to have a simple test case on, rather than having a bunch of "tests" that are not actually running.
What Does This Do
Instruments the new constructor for KafkaConsumer in version 2.7.
Before that, we failed to instrument it, and though were not able to capture Kafka lag or Kafka cluster ID for this version.
Motivation
Additional Notes
Also, fixing latest dependency tests that were marked as flaky a while ago. I made them simpler, as it's better to have easy tests enabled, rather than complex one that are disabled (these tests should have caught the issue when Kafka published the 2.7 version).
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]