-
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 schema tracking for nested messages #7690
Conversation
@@ -0,0 +1,14 @@ | |||
To generate the Protobuf message, we need to use an old version of protobuf (3.0.0), because we want to support the protobuf library starting at 3.0.0 |
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 struggled with that for a while ... again (I already struggled with it when I added this integration).
So I decided to add a small readme, even if it's just for future me.
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.
Can’t we make it part of the build script by creating a custom gradle task for?
I did it in my previous company and worked well. You can even pick the version of protoc you would like to use.
d37d9c5
to
0a7e204
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 11 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.08 s) : 0, 1080403
Total [baseline] (10.494 s) : 0, 10494380
Agent [candidate] (1.076 s) : 0, 1076438
Total [candidate] (10.384 s) : 0, 10383964
section appsec
Agent [baseline] (1.201 s) : 0, 1200948
Total [baseline] (10.567 s) : 0, 10566783
Agent [candidate] (1.199 s) : 0, 1199285
Total [candidate] (10.59 s) : 0, 10590156
section iast
Agent [baseline] (1.202 s) : 0, 1202336
Total [baseline] (10.847 s) : 0, 10846902
Agent [candidate] (1.208 s) : 0, 1208302
Total [candidate] (10.886 s) : 0, 10885957
section profiling
Agent [baseline] (1.266 s) : 0, 1266484
Total [baseline] (10.629 s) : 0, 10629284
Agent [candidate] (1.266 s) : 0, 1266246
Total [candidate] (10.614 s) : 0, 10613549
gantt
title petclinic - break down per module: candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (690.086 ms) : 0, 690086
BytebuddyAgent [candidate] (686.719 ms) : 0, 686719
GlobalTracer [baseline] (313.927 ms) : 0, 313927
GlobalTracer [candidate] (313.504 ms) : 0, 313504
AppSec [baseline] (54.182 ms) : 0, 54182
AppSec [candidate] (54.077 ms) : 0, 54077
Remote Config [baseline] (671.069 µs) : 0, 671
Remote Config [candidate] (667.623 µs) : 0, 668
Telemetry [baseline] (7.709 ms) : 0, 7709
Telemetry [candidate] (7.672 ms) : 0, 7672
section appsec
BytebuddyAgent [baseline] (696.57 ms) : 0, 696570
BytebuddyAgent [candidate] (696.506 ms) : 0, 696506
GlobalTracer [baseline] (307.311 ms) : 0, 307311
GlobalTracer [candidate] (307.833 ms) : 0, 307833
AppSec [baseline] (164.735 ms) : 0, 164735
AppSec [candidate] (161.5 ms) : 0, 161500
IAST [baseline] (19.912 ms) : 0, 19912
IAST [candidate] (21.387 ms) : 0, 21387
Remote Config [baseline] (630.29 µs) : 0, 630
Remote Config [candidate] (643.619 µs) : 0, 644
Telemetry [baseline] (8.126 ms) : 0, 8126
Telemetry [candidate] (8.474 ms) : 0, 8474
section iast
BytebuddyAgent [baseline] (801.738 ms) : 0, 801738
BytebuddyAgent [candidate] (805.329 ms) : 0, 805329
GlobalTracer [baseline] (300.879 ms) : 0, 300879
GlobalTracer [candidate] (302.205 ms) : 0, 302205
AppSec [baseline] (54.568 ms) : 0, 54568
AppSec [candidate] (53.758 ms) : 0, 53758
IAST [baseline] (23.671 ms) : 0, 23671
IAST [candidate] (24.611 ms) : 0, 24611
Remote Config [baseline] (604.847 µs) : 0, 605
Remote Config [candidate] (613.094 µs) : 0, 613
Telemetry [baseline] (7.118 ms) : 0, 7118
Telemetry [candidate] (7.909 ms) : 0, 7909
section profiling
BytebuddyAgent [baseline] (674.786 ms) : 0, 674786
BytebuddyAgent [candidate] (675.774 ms) : 0, 675774
GlobalTracer [baseline] (393.429 ms) : 0, 393429
GlobalTracer [candidate] (393.089 ms) : 0, 393089
AppSec [baseline] (54.737 ms) : 0, 54737
AppSec [candidate] (54.518 ms) : 0, 54518
Remote Config [baseline] (654.589 µs) : 0, 655
Remote Config [candidate] (649.349 µs) : 0, 649
Telemetry [baseline] (7.462 ms) : 0, 7462
Telemetry [candidate] (7.452 ms) : 0, 7452
ProfilingAgent [baseline] (96.833 ms) : 0, 96833
ProfilingAgent [candidate] (96.21 ms) : 0, 96210
Profiling [baseline] (96.856 ms) : 0, 96856
Profiling [candidate] (96.234 ms) : 0, 96234
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.076 s) : 0, 1075893
Total [baseline] (8.559 s) : 0, 8558542
Agent [candidate] (1.065 s) : 0, 1065355
Total [candidate] (8.556 s) : 0, 8555863
section iast
Agent [baseline] (1.193 s) : 0, 1193368
Total [baseline] (9.081 s) : 0, 9080641
Agent [candidate] (1.195 s) : 0, 1194916
Total [candidate] (9.083 s) : 0, 9083175
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.192 s) : 0, 1191801
Total [baseline] (9.04 s) : 0, 9039850
Agent [candidate] (1.205 s) : 0, 1204700
Total [candidate] (9.079 s) : 0, 9079271
section iast_TELEMETRY_OFF
Agent [baseline] (1.189 s) : 0, 1188541
Total [baseline] (9.048 s) : 0, 9048415
Agent [candidate] (1.189 s) : 0, 1188604
Total [candidate] (9.078 s) : 0, 9077690
gantt
title insecure-bank - break down per module: candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.068 ms) : 0, 687068
BytebuddyAgent [candidate] (679.539 ms) : 0, 679539
GlobalTracer [baseline] (312.897 ms) : 0, 312897
GlobalTracer [candidate] (310.272 ms) : 0, 310272
AppSec [baseline] (53.869 ms) : 0, 53869
AppSec [candidate] (53.596 ms) : 0, 53596
Remote Config [baseline] (666.317 µs) : 0, 666
Remote Config [candidate] (667.834 µs) : 0, 668
Telemetry [baseline] (7.659 ms) : 0, 7659
Telemetry [candidate] (7.607 ms) : 0, 7607
section iast
BytebuddyAgent [baseline] (795.01 ms) : 0, 795010
BytebuddyAgent [candidate] (795.99 ms) : 0, 795990
GlobalTracer [baseline] (299.255 ms) : 0, 299255
GlobalTracer [candidate] (299.485 ms) : 0, 299485
AppSec [baseline] (56.026 ms) : 0, 56026
AppSec [candidate] (55.367 ms) : 0, 55367
IAST [baseline] (21.823 ms) : 0, 21823
IAST [candidate] (22.665 ms) : 0, 22665
Remote Config [baseline] (600.244 µs) : 0, 600
Remote Config [candidate] (612.61 µs) : 0, 613
Telemetry [baseline] (7.033 ms) : 0, 7033
Telemetry [candidate] (7.071 ms) : 0, 7071
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (794.096 ms) : 0, 794096
BytebuddyAgent [candidate] (802.989 ms) : 0, 802989
GlobalTracer [baseline] (298.751 ms) : 0, 298751
GlobalTracer [candidate] (302.52 ms) : 0, 302520
AppSec [baseline] (55.114 ms) : 0, 55114
AppSec [candidate] (53.955 ms) : 0, 53955
IAST [baseline] (22.55 ms) : 0, 22550
IAST [candidate] (23.716 ms) : 0, 23716
Remote Config [baseline] (591.341 µs) : 0, 591
Remote Config [candidate] (600.281 µs) : 0, 600
Telemetry [baseline] (7.041 ms) : 0, 7041
Telemetry [candidate] (7.091 ms) : 0, 7091
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (790.98 ms) : 0, 790980
BytebuddyAgent [candidate] (790.505 ms) : 0, 790505
GlobalTracer [baseline] (298.787 ms) : 0, 298787
GlobalTracer [candidate] (299.111 ms) : 0, 299111
AppSec [baseline] (54.596 ms) : 0, 54596
AppSec [candidate] (55.49 ms) : 0, 55490
IAST [baseline] (22.998 ms) : 0, 22998
IAST [candidate] (22.333 ms) : 0, 22333
Remote Config [baseline] (608.141 µs) : 0, 608
Remote Config [candidate] (597.508 µs) : 0, 598
Telemetry [baseline] (6.889 ms) : 0, 6889
Telemetry [candidate] (6.888 ms) : 0, 6888
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 6 metrics, 22 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section baseline
no_agent (1.697 ms) : 1673, 1722
. : milestone, 1697,
appsec (2.157 ms) : 2126, 2188
. : milestone, 2157,
appsec_no_iast (2.17 ms) : 2138, 2202
. : milestone, 2170,
iast (1.896 ms) : 1865, 1928
. : milestone, 1896,
profiling (1.896 ms) : 1863, 1929
. : milestone, 1896,
tracing (1.858 ms) : 1826, 1890
. : milestone, 1858,
section candidate
no_agent (1.717 ms) : 1693, 1741
. : milestone, 1717,
appsec (2.214 ms) : 2184, 2245
. : milestone, 2214,
appsec_no_iast (2.206 ms) : 2174, 2237
. : milestone, 2206,
iast (1.87 ms) : 1839, 1902
. : milestone, 1870,
profiling (1.903 ms) : 1868, 1938
. : milestone, 1903,
tracing (1.854 ms) : 1822, 1886
. : milestone, 1854,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section baseline
no_agent (456.734 µs) : 427, 486
. : milestone, 457,
iast (581.429 µs) : 550, 613
. : milestone, 581,
iast_FULL (686.587 µs) : 654, 719
. : milestone, 687,
iast_GLOBAL (626.435 µs) : 592, 661
. : milestone, 626,
iast_HARDCODED_SECRET_DISABLED (582.537 µs) : 551, 614
. : milestone, 583,
iast_INACTIVE (538.845 µs) : 508, 570
. : milestone, 539,
iast_TELEMETRY_OFF (571.609 µs) : 539, 605
. : milestone, 572,
tracing (541.439 µs) : 511, 572
. : milestone, 541,
section candidate
no_agent (452.119 µs) : 423, 481
. : milestone, 452,
iast (584.882 µs) : 554, 616
. : milestone, 585,
iast_FULL (680.879 µs) : 648, 714
. : milestone, 681,
iast_GLOBAL (616.009 µs) : 583, 649
. : milestone, 616,
iast_HARDCODED_SECRET_DISABLED (590.809 µs) : 559, 623
. : milestone, 591,
iast_INACTIVE (551.855 µs) : 522, 582
. : milestone, 552,
iast_TELEMETRY_OFF (574.121 µs) : 542, 607
. : milestone, 574,
tracing (538.85 µs) : 509, 569
. : milestone, 539,
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.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section baseline
no_agent (15.178 s) : 15178000, 15178000
. : milestone, 15178000,
appsec (15.504 s) : 15504000, 15504000
. : milestone, 15504000,
iast (19.131 s) : 19131000, 19131000
. : milestone, 19131000,
iast_GLOBAL (17.908 s) : 17908000, 17908000
. : milestone, 17908000,
profiling (14.896 s) : 14896000, 14896000
. : milestone, 14896000,
tracing (14.964 s) : 14964000, 14964000
. : milestone, 14964000,
section candidate
no_agent (14.884 s) : 14884000, 14884000
. : milestone, 14884000,
appsec (15.044 s) : 15044000, 15044000
. : milestone, 15044000,
iast (19.097 s) : 19097000, 19097000
. : milestone, 19097000,
iast_GLOBAL (17.993 s) : 17993000, 17993000
. : milestone, 17993000,
profiling (15.304 s) : 15304000, 15304000
. : milestone, 15304000,
tracing (15.3 s) : 15300000, 15300000
. : milestone, 15300000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.41.0-SNAPSHOT~b9017ddc0f, baseline=1.41.0-SNAPSHOT~f5b158c64d
dateFormat X
axisFormat %s
section baseline
no_agent (1.463 ms) : 1451, 1474
. : milestone, 1463,
appsec (2.322 ms) : 2281, 2362
. : milestone, 2322,
iast (2.072 ms) : 2021, 2123
. : milestone, 2072,
iast_GLOBAL (2.105 ms) : 2053, 2157
. : milestone, 2105,
profiling (1.933 ms) : 1891, 1975
. : milestone, 1933,
tracing (1.91 ms) : 1871, 1949
. : milestone, 1910,
section candidate
no_agent (1.466 ms) : 1455, 1478
. : milestone, 1466,
appsec (2.318 ms) : 2278, 2358
. : milestone, 2318,
iast (2.069 ms) : 2018, 2120
. : milestone, 2069,
iast_GLOBAL (2.102 ms) : 2050, 2153
. : milestone, 2102,
profiling (1.94 ms) : 1899, 1981
. : milestone, 1940,
tracing (1.9 ms) : 1861, 1939
. : milestone, 1900,
|
78185bf
to
8c16787
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.
I was more thinking of reusing the Gradle plugin issued by Google. That would prevent to re-invent the wheel.
In addition, everything could stay within the instrumentation gradle module, and the generation task should directly be part of the build task
.
05e3b4d
to
5137764
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.
Looks good from module change / packaging and test.
You might want another pair of eyes from @DataDog/apm-idm-java for the CallDepthThreadLocalMap
usage 👀
What Does This Do
Adds recursive protection to only get the schema of the top level message.
This was not only causing CPU overhead, but was also producing wrong data (schema name was the name of the most nested message).
I believe we have the same issue with Avro. I will open later for it once I'm able to reproduce the bug in Avro.
Motivation
Additional Notes
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]