-
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 relying on configId for remote config log level tracer flare change #7788
Conversation
977a5ba
to
d915e2a
Compare
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.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.084 s) : 0, 1083984
Total [baseline] (8.62 s) : 0, 8619771
Agent [candidate] (1.084 s) : 0, 1084036
Total [candidate] (8.584 s) : 0, 8584353
section iast
Agent [baseline] (1.208 s) : 0, 1207815
Total [baseline] (9.128 s) : 0, 9127717
Agent [candidate] (1.207 s) : 0, 1207409
Total [candidate] (9.108 s) : 0, 9108029
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.201 s) : 0, 1201192
Total [baseline] (9.081 s) : 0, 9080652
Agent [candidate] (1.21 s) : 0, 1209918
Total [candidate] (9.104 s) : 0, 9103592
section iast_TELEMETRY_OFF
Agent [baseline] (1.198 s) : 0, 1198299
Total [baseline] (9.108 s) : 0, 9108026
Agent [candidate] (1.197 s) : 0, 1197408
Total [candidate] (9.114 s) : 0, 9113709
gantt
title insecure-bank - break down per module: candidate=1.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (690.326 ms) : 0, 690326
BytebuddyAgent [candidate] (690.496 ms) : 0, 690496
GlobalTracer [baseline] (314.549 ms) : 0, 314549
GlobalTracer [candidate] (314.537 ms) : 0, 314537
AppSec [baseline] (53.814 ms) : 0, 53814
AppSec [candidate] (54.228 ms) : 0, 54228
Remote Config [baseline] (663.815 µs) : 0, 664
Remote Config [candidate] (675.208 µs) : 0, 675
Telemetry [baseline] (10.921 ms) : 0, 10921
Telemetry [candidate] (10.369 ms) : 0, 10369
section iast
BytebuddyAgent [baseline] (805.79 ms) : 0, 805790
BytebuddyAgent [candidate] (805.188 ms) : 0, 805188
GlobalTracer [baseline] (303.617 ms) : 0, 303617
GlobalTracer [candidate] (302.882 ms) : 0, 302882
AppSec [baseline] (56.286 ms) : 0, 56286
AppSec [candidate] (56.859 ms) : 0, 56859
IAST [baseline] (20.861 ms) : 0, 20861
IAST [candidate] (21.114 ms) : 0, 21114
Remote Config [baseline] (581.452 µs) : 0, 581
Remote Config [candidate] (607.223 µs) : 0, 607
Telemetry [baseline] (6.97 ms) : 0, 6970
Telemetry [candidate] (7.007 ms) : 0, 7007
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (799.65 ms) : 0, 799650
BytebuddyAgent [candidate] (806.216 ms) : 0, 806216
GlobalTracer [baseline] (302.219 ms) : 0, 302219
GlobalTracer [candidate] (304.468 ms) : 0, 304468
AppSec [baseline] (57.082 ms) : 0, 57082
AppSec [candidate] (56.672 ms) : 0, 56672
IAST [baseline] (20.903 ms) : 0, 20903
IAST [candidate] (21.187 ms) : 0, 21187
Remote Config [baseline] (592.257 µs) : 0, 592
Remote Config [candidate] (606.635 µs) : 0, 607
Telemetry [baseline] (7.097 ms) : 0, 7097
Telemetry [candidate] (7.038 ms) : 0, 7038
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (797.393 ms) : 0, 797393
BytebuddyAgent [candidate] (796.676 ms) : 0, 796676
GlobalTracer [baseline] (302.021 ms) : 0, 302021
GlobalTracer [candidate] (302.386 ms) : 0, 302386
AppSec [baseline] (57.786 ms) : 0, 57786
AppSec [candidate] (56.35 ms) : 0, 56350
IAST [baseline] (19.892 ms) : 0, 19892
IAST [candidate] (20.739 ms) : 0, 20739
Remote Config [baseline] (597.0 µs) : 0, 597
Remote Config [candidate] (593.241 µs) : 0, 593
Telemetry [baseline] (6.968 ms) : 0, 6968
Telemetry [candidate] (7.019 ms) : 0, 7019
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.084 s) : 0, 1084002
Total [baseline] (10.48 s) : 0, 10480010
Agent [candidate] (1.086 s) : 0, 1085758
Total [candidate] (10.514 s) : 0, 10514350
section appsec
Agent [baseline] (1.209 s) : 0, 1208956
Total [baseline] (10.666 s) : 0, 10665636
Agent [candidate] (1.216 s) : 0, 1216219
Total [candidate] (10.744 s) : 0, 10744012
section iast
Agent [baseline] (1.201 s) : 0, 1201464
Total [baseline] (10.889 s) : 0, 10889136
Agent [candidate] (1.211 s) : 0, 1210838
Total [candidate] (10.906 s) : 0, 10905561
section profiling
Agent [baseline] (1.276 s) : 0, 1276335
Total [baseline] (10.73 s) : 0, 10730346
Agent [candidate] (1.27 s) : 0, 1270295
Total [candidate] (10.716 s) : 0, 10715554
gantt
title petclinic - break down per module: candidate=1.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (690.871 ms) : 0, 690871
BytebuddyAgent [candidate] (690.313 ms) : 0, 690313
GlobalTracer [baseline] (315.5 ms) : 0, 315500
GlobalTracer [candidate] (314.961 ms) : 0, 314961
AppSec [baseline] (54.266 ms) : 0, 54266
AppSec [candidate] (54.43 ms) : 0, 54430
Remote Config [baseline] (667.268 µs) : 0, 667
Remote Config [candidate] (677.005 µs) : 0, 677
Telemetry [baseline] (8.947 ms) : 0, 8947
Telemetry [candidate] (11.627 ms) : 0, 11627
section appsec
BytebuddyAgent [baseline] (700.752 ms) : 0, 700752
BytebuddyAgent [candidate] (706.828 ms) : 0, 706828
GlobalTracer [baseline] (310.722 ms) : 0, 310722
GlobalTracer [candidate] (312.418 ms) : 0, 312418
AppSec [baseline] (165.874 ms) : 0, 165874
AppSec [candidate] (165.353 ms) : 0, 165353
Remote Config [baseline] (638.829 µs) : 0, 639
Remote Config [candidate] (642.118 µs) : 0, 642
Telemetry [baseline] (7.753 ms) : 0, 7753
Telemetry [candidate] (7.115 ms) : 0, 7115
IAST [baseline] (19.275 ms) : 0, 19275
IAST [candidate] (20.217 ms) : 0, 20217
section iast
BytebuddyAgent [baseline] (800.737 ms) : 0, 800737
BytebuddyAgent [candidate] (807.288 ms) : 0, 807288
GlobalTracer [baseline] (302.018 ms) : 0, 302018
GlobalTracer [candidate] (304.354 ms) : 0, 304354
AppSec [baseline] (57.18 ms) : 0, 57180
AppSec [candidate] (55.86 ms) : 0, 55860
Remote Config [baseline] (605.449 µs) : 0, 605
Remote Config [candidate] (595.672 µs) : 0, 596
Telemetry [baseline] (7.034 ms) : 0, 7034
Telemetry [candidate] (7.029 ms) : 0, 7029
IAST [baseline] (20.276 ms) : 0, 20276
IAST [candidate] (21.944 ms) : 0, 21944
section profiling
ProfilingAgent [baseline] (90.967 ms) : 0, 90967
ProfilingAgent [candidate] (90.871 ms) : 0, 90871
BytebuddyAgent [baseline] (681.863 ms) : 0, 681863
BytebuddyAgent [candidate] (677.643 ms) : 0, 677643
GlobalTracer [baseline] (397.124 ms) : 0, 397124
GlobalTracer [candidate] (396.061 ms) : 0, 396061
AppSec [baseline] (54.573 ms) : 0, 54573
AppSec [candidate] (54.301 ms) : 0, 54301
Remote Config [baseline] (655.828 µs) : 0, 656
Remote Config [candidate] (648.763 µs) : 0, 649
Telemetry [baseline] (12.297 ms) : 0, 12297
Telemetry [candidate] (12.171 ms) : 0, 12171
Profiling [baseline] (90.99 ms) : 0, 90990
Profiling [candidate] (90.894 ms) : 0, 90894
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.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section baseline
no_agent (365.571 µs) : 346, 385
. : milestone, 366,
iast (489.496 µs) : 469, 510
. : milestone, 489,
iast_FULL (564.677 µs) : 543, 586
. : milestone, 565,
iast_GLOBAL (509.716 µs) : 489, 531
. : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (490.652 µs) : 469, 512
. : milestone, 491,
iast_INACTIVE (444.604 µs) : 424, 465
. : milestone, 445,
iast_TELEMETRY_OFF (481.231 µs) : 460, 503
. : milestone, 481,
tracing (446.833 µs) : 426, 468
. : milestone, 447,
section candidate
no_agent (379.168 µs) : 359, 399
. : milestone, 379,
iast (492.953 µs) : 471, 515
. : milestone, 493,
iast_FULL (558.289 µs) : 537, 579
. : milestone, 558,
iast_GLOBAL (522.629 µs) : 500, 545
. : milestone, 523,
iast_HARDCODED_SECRET_DISABLED (486.248 µs) : 465, 508
. : milestone, 486,
iast_INACTIVE (461.504 µs) : 441, 482
. : milestone, 462,
iast_TELEMETRY_OFF (475.317 µs) : 454, 496
. : milestone, 475,
tracing (451.232 µs) : 430, 472
. : milestone, 451,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section baseline
no_agent (1.331 ms) : 1312, 1350
. : milestone, 1331,
appsec (1.718 ms) : 1694, 1743
. : milestone, 1718,
appsec_no_iast (1.733 ms) : 1709, 1756
. : milestone, 1733,
iast (1.484 ms) : 1462, 1506
. : milestone, 1484,
profiling (1.473 ms) : 1450, 1496
. : milestone, 1473,
tracing (1.459 ms) : 1435, 1483
. : milestone, 1459,
section candidate
no_agent (1.352 ms) : 1332, 1371
. : milestone, 1352,
appsec (1.716 ms) : 1692, 1741
. : milestone, 1716,
appsec_no_iast (1.749 ms) : 1725, 1772
. : milestone, 1749,
iast (1.485 ms) : 1462, 1508
. : milestone, 1485,
profiling (1.473 ms) : 1450, 1496
. : milestone, 1473,
tracing (1.49 ms) : 1466, 1514
. : milestone, 1490,
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.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section baseline
no_agent (15.578 s) : 15578000, 15578000
. : milestone, 15578000,
appsec (15.122 s) : 15122000, 15122000
. : milestone, 15122000,
iast (18.892 s) : 18892000, 18892000
. : milestone, 18892000,
iast_GLOBAL (17.919 s) : 17919000, 17919000
. : milestone, 17919000,
profiling (14.83 s) : 14830000, 14830000
. : milestone, 14830000,
tracing (15.207 s) : 15207000, 15207000
. : milestone, 15207000,
section candidate
no_agent (15.455 s) : 15455000, 15455000
. : milestone, 15455000,
appsec (15.086 s) : 15086000, 15086000
. : milestone, 15086000,
iast (19.103 s) : 19103000, 19103000
. : milestone, 19103000,
iast_GLOBAL (18.011 s) : 18011000, 18011000
. : milestone, 18011000,
profiling (15.066 s) : 15066000, 15066000
. : milestone, 15066000,
tracing (15.124 s) : 15124000, 15124000
. : milestone, 15124000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~4374cc58bc, baseline=1.42.0-SNAPSHOT~890f95bba8
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.331 ms) : 2290, 2372
. : milestone, 2331,
iast (2.072 ms) : 2020, 2125
. : milestone, 2072,
iast_GLOBAL (2.125 ms) : 2073, 2177
. : milestone, 2125,
profiling (1.939 ms) : 1897, 1982
. : milestone, 1939,
tracing (1.929 ms) : 1889, 1969
. : milestone, 1929,
section candidate
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.329 ms) : 2287, 2370
. : milestone, 2329,
iast (2.082 ms) : 2030, 2134
. : milestone, 2082,
iast_GLOBAL (2.132 ms) : 2080, 2185
. : milestone, 2132,
profiling (1.939 ms) : 1897, 1981
. : milestone, 1939,
tracing (1.922 ms) : 1882, 1961
. : milestone, 1922,
|
@@ -68,23 +71,24 @@ public Runnable register(Config config, SharedCommunicationObjects sco) { | |||
@Override | |||
public void accept(ConfigKey configKey, byte[] content, PollingRateHinter hinter) | |||
throws IOException { | |||
if (configKey.getConfigId().startsWith(FLARE_LOG_LEVEL_PREFIX)) { |
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 suppose we had this check because testing a startsWith
is much less expansive than parsing a full json. If this is only executed when a tracer flare is requested though, I guess the perf impact is not too big of an issue.
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.
@vandonr According to the spec, we have no other choice than to read the JSON:
The tracer should NOT rely on the configuration ID or configuration name, because this is not guaranteed to be consistent.
The tracer must check for config.log_level: "debug" content, as other AGENT_CONFIG configurations can be sent for something different.
dd-trace-core/src/main/java/datadog/trace/core/flare/TracerFlarePoller.java
Outdated
Show resolved
Hide resolved
…rePoller.java simplification of code Co-authored-by: Stuart McCulloch <[email protected]>
53ef9ce
to
4374cc5
Compare
What Does This Do
For changing the log level of the logs in the tracer flare , we were relying on configID starting with "flare-log-level.".
But we shouldn't: The configId could change in the future, so in order to be future-proof, the tracer should rely on the content of the config instead.
In addition, since for resetting the log level to its original value, we stop sending the configuration, we need to keep the action associated with this configId.
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any useful labelsJira ticket: APMAPI-124