Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Aug 21, 2025

What Does This Do

Previously, telemetry was only being reported for the ConfigSource that set the final value of the configuration. This PR introduces reporting telemetry for all ConfigSources that have non-null values set, regardless of whether it sets the final configuration value or not.

Summary of Changes:

  • ConfigCollector
    • Stores config telemetry payloads of Map<ConfigOrigin, Map<String (configName), ConfigSetting>>
    • Deprecates old put method in favor of a new put method with seq_id field
    • New putDefault method is created to ensure originally reported defaults are not overwritten. Use cases:
      • ConfigProvider methods getEnum, getIntegerRange, getSet and getList invoke getString, which erroneously reports defaults as null under the hood
      • when a Config is already processed by the ConfigProvider, then a function like isExplicitlyDisabled is called and invokes getBoolean without the proper default value, which previously would override the DEFAULT telemetry payload with null.
  • ConfigSetting
    • New field seqId and new of function that takes it in as a parameter
  • ConfigProvider
    • All methods querying ConfigSources start from lowest priority to highest priority. A local seqId is used to track priority of ConfigSources that are set. In the case of parsing errors, there may be re-reporting of the last valid ConfigSource to ensure the highest priority and valid ConfigSource is reported with the highest seqId
    • ConfigValueResolver
      • Helper class to help with re-reporting configurations. Includes key, value, seqId, and ConfigOrigin.
      • All ConfigProvider methods now store the final return value through ConfigValueResolver
    • ConfigMergeResolver
      • Helper class to help with merging maps from multiple sources

Motivation

RFC

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Aug 21, 2025

🎯 Code Coverage
Patch Coverage: 63.64%
Total Coverage: 59.91% (+0.10%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5b5ad0d | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Aug 21, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/4-config-sources
git_commit_date 1758638766 1758643649
git_commit_sha e992b65 5b5ad0d
release_version 1.54.0-SNAPSHOT~e992b65c80 1.53.0-SNAPSHOT~5b5ad0d63e
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758645391 1758645391
ci_job_id 1143613272 1143613272
ci_pipeline_id 77305571 77305571
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-e6j8ip2y 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-e6j8ip2y 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 4 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.004 s) : 0, 1003725
Total [baseline] (8.622 s) : 0, 8622358
Agent [candidate] (1.01 s) : 0, 1009642
Total [candidate] (8.646 s) : 0, 8645933
section iast
Agent [baseline] (1.148 s) : 0, 1147789
Total [baseline] (9.28 s) : 0, 9280276
Agent [candidate] (1.144 s) : 0, 1143836
Total [candidate] (9.28 s) : 0, 9280082
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.004 s -
Agent iast 1.148 s 144.064 ms (14.4%)
Total tracing 8.622 s -
Total iast 9.28 s 657.918 ms (7.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.01 s -
Agent iast 1.144 s 134.195 ms (13.3%)
Total tracing 8.646 s -
Total iast 9.28 s 634.148 ms (7.3%)
gantt
    title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (686.741 ms) : 0, 686741
BytebuddyAgent [candidate] (690.903 ms) : 0, 690903
GlobalTracer [baseline] (247.442 ms) : 0, 247442
GlobalTracer [candidate] (248.881 ms) : 0, 248881
AppSec [baseline] (30.963 ms) : 0, 30963
AppSec [candidate] (31.235 ms) : 0, 31235
Debugger [baseline] (6.307 ms) : 0, 6307
Debugger [candidate] (6.443 ms) : 0, 6443
Remote Config [baseline] (678.336 µs) : 0, 678
Remote Config [candidate] (670.796 µs) : 0, 671
Telemetry [baseline] (9.064 ms) : 0, 9064
Telemetry [candidate] (9.024 ms) : 0, 9024
section iast
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (811.194 ms) : 0, 811194
BytebuddyAgent [candidate] (809.142 ms) : 0, 809142
GlobalTracer [baseline] (238.913 ms) : 0, 238913
GlobalTracer [candidate] (237.078 ms) : 0, 237078
AppSec [baseline] (33.78 ms) : 0, 33780
AppSec [candidate] (33.923 ms) : 0, 33923
Debugger [baseline] (6.131 ms) : 0, 6131
Debugger [candidate] (6.048 ms) : 0, 6048
Remote Config [baseline] (588.017 µs) : 0, 588
Remote Config [candidate] (583.044 µs) : 0, 583
Telemetry [baseline] (8.414 ms) : 0, 8414
Telemetry [candidate] (8.261 ms) : 0, 8261
IAST [baseline] (26.142 ms) : 0, 26142
IAST [candidate] (26.181 ms) : 0, 26181
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.007 s) : 0, 1006614
Total [baseline] (10.664 s) : 0, 10663696
Agent [candidate] (1.016 s) : 0, 1015808
Total [candidate] (10.755 s) : 0, 10754656
section appsec
Agent [baseline] (1.186 s) : 0, 1186474
Total [baseline] (10.956 s) : 0, 10955930
Agent [candidate] (1.187 s) : 0, 1186686
Total [candidate] (10.964 s) : 0, 10963765
section iast
Agent [baseline] (1.15 s) : 0, 1150186
Total [baseline] (10.954 s) : 0, 10954200
Agent [candidate] (1.143 s) : 0, 1142597
Total [candidate] (10.977 s) : 0, 10976555
section profiling
Agent [baseline] (1.153 s) : 0, 1152893
Total [baseline] (11.034 s) : 0, 11033584
Agent [candidate] (1.153 s) : 0, 1153368
Total [candidate] (11.07 s) : 0, 11069707
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.007 s -
Agent appsec 1.186 s 179.859 ms (17.9%)
Agent iast 1.15 s 143.572 ms (14.3%)
Agent profiling 1.153 s 146.279 ms (14.5%)
Total tracing 10.664 s -
Total appsec 10.956 s 292.234 ms (2.7%)
Total iast 10.954 s 290.505 ms (2.7%)
Total profiling 11.034 s 369.889 ms (3.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.016 s -
Agent appsec 1.187 s 170.878 ms (16.8%)
Agent iast 1.143 s 126.789 ms (12.5%)
Agent profiling 1.153 s 137.56 ms (13.5%)
Total tracing 10.755 s -
Total appsec 10.964 s 209.109 ms (1.9%)
Total iast 10.977 s 221.899 ms (2.1%)
Total profiling 11.07 s 315.05 ms (2.9%)
gantt
    title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.469 ms) : 0, 1469
BytebuddyAgent [baseline] (689.074 ms) : 0, 689074
BytebuddyAgent [candidate] (695.313 ms) : 0, 695313
GlobalTracer [baseline] (247.587 ms) : 0, 247587
GlobalTracer [candidate] (250.284 ms) : 0, 250284
AppSec [baseline] (31.183 ms) : 0, 31183
AppSec [candidate] (31.376 ms) : 0, 31376
Debugger [baseline] (6.344 ms) : 0, 6344
Debugger [candidate] (6.451 ms) : 0, 6451
Remote Config [baseline] (674.175 µs) : 0, 674
Remote Config [candidate] (672.549 µs) : 0, 673
Telemetry [baseline] (9.028 ms) : 0, 9028
Telemetry [candidate] (9.027 ms) : 0, 9027
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (711.198 ms) : 0, 711198
BytebuddyAgent [candidate] (712.429 ms) : 0, 712429
GlobalTracer [baseline] (239.61 ms) : 0, 239610
GlobalTracer [candidate] (240.008 ms) : 0, 240008
AppSec [baseline] (170.805 ms) : 0, 170805
AppSec [candidate] (171.995 ms) : 0, 171995
Debugger [baseline] (6.761 ms) : 0, 6761
Debugger [candidate] (5.953 ms) : 0, 5953
Remote Config [baseline] (626.922 µs) : 0, 627
Remote Config [candidate] (641.711 µs) : 0, 642
Telemetry [baseline] (10.009 ms) : 0, 10009
Telemetry [candidate] (8.43 ms) : 0, 8430
IAST [baseline] (24.877 ms) : 0, 24877
IAST [candidate] (24.696 ms) : 0, 24696
section iast
crashtracking [baseline] (1.457 ms) : 0, 1457
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (813.255 ms) : 0, 813255
BytebuddyAgent [candidate] (809.125 ms) : 0, 809125
GlobalTracer [baseline] (239.117 ms) : 0, 239117
GlobalTracer [candidate] (236.609 ms) : 0, 236609
AppSec [baseline] (33.934 ms) : 0, 33934
AppSec [candidate] (33.566 ms) : 0, 33566
Debugger [baseline] (6.121 ms) : 0, 6121
Debugger [candidate] (5.983 ms) : 0, 5983
Remote Config [baseline] (603.261 µs) : 0, 603
Remote Config [candidate] (578.162 µs) : 0, 578
Telemetry [baseline] (8.197 ms) : 0, 8197
Telemetry [candidate] (8.195 ms) : 0, 8195
IAST [baseline] (26.309 ms) : 0, 26309
IAST [candidate] (25.89 ms) : 0, 25890
section profiling
ProfilingAgent [baseline] (101.053 ms) : 0, 101053
ProfilingAgent [candidate] (101.254 ms) : 0, 101254
crashtracking [baseline] (1.451 ms) : 0, 1451
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (719.977 ms) : 0, 719977
BytebuddyAgent [candidate] (719.063 ms) : 0, 719063
GlobalTracer [baseline] (224.253 ms) : 0, 224253
GlobalTracer [candidate] (224.767 ms) : 0, 224767
AppSec [baseline] (31.396 ms) : 0, 31396
AppSec [candidate] (31.266 ms) : 0, 31266
Debugger [baseline] (8.03 ms) : 0, 8030
Debugger [candidate] (7.287 ms) : 0, 7287
Remote Config [baseline] (708.737 µs) : 0, 709
Remote Config [candidate] (717.38 µs) : 0, 717
Telemetry [baseline] (14.789 ms) : 0, 14789
Telemetry [candidate] (15.549 ms) : 0, 15549
Profiling [baseline] (101.632 ms) : 0, 101632
Profiling [candidate] (101.85 ms) : 0, 101850
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/4-config-sources
git_commit_date 1758647631 1758643649
git_commit_sha 27641db 5b5ad0d
release_version 1.54.0-SNAPSHOT~27641dbc53 1.53.0-SNAPSHOT~5b5ad0d63e
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758651173 1758651173
ci_job_id 1143847756 1143847756
ci_pipeline_id 77305571 77305571
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-178ye5jv 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-178ye5jv 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load better
[-791.239µs; -376.006µs] or [-7.206%; -3.424%]
unstable
[-23.565op/s; +70.815op/s] or [-5.567%; +16.730%]
10.397ms 446.906op/s 10.981ms 423.281op/s
scenario:load:insecure-bank:profiling:high_load worse
[+356.089µs; +675.924µs] or [+3.936%; +7.471%]
unstable
[-85.120op/s; +30.183op/s] or [-16.599%; +5.886%]
9.564ms 485.344op/s 9.048ms 512.812op/s
scenario:load:petclinic:profiling:high_load worse
[+1.295ms; +2.293ms] or [+2.643%; +4.679%]
unstable
[-10.142op/s; +3.392op/s] or [-10.620%; +3.552%]
50.799ms 92.125op/s 49.005ms 95.500op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~27641dbc53
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.177 ms) : 36876, 37477
.   : milestone, 37177,
appsec (48.061 ms) : 47633, 48489
.   : milestone, 48061,
code_origins (44.227 ms) : 43844, 44611
.   : milestone, 44227,
iast (44.777 ms) : 44380, 45175
.   : milestone, 44777,
profiling (49.005 ms) : 48558, 49451
.   : milestone, 49005,
tracing (44.254 ms) : 43882, 44627
.   : milestone, 44254,
section candidate
no_agent (37.818 ms) : 37511, 38124
.   : milestone, 37818,
appsec (48.924 ms) : 48481, 49366
.   : milestone, 48924,
code_origins (43.1 ms) : 42731, 43468
.   : milestone, 43100,
iast (44.552 ms) : 44175, 44928
.   : milestone, 44552,
profiling (50.799 ms) : 50319, 51279
.   : milestone, 50799,
tracing (45.089 ms) : 44696, 45481
.   : milestone, 45089,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.177 ms [36.876 ms, 37.477 ms] -
appsec 48.061 ms [47.633 ms, 48.489 ms] 10.884 ms (29.3%)
code_origins 44.227 ms [43.844 ms, 44.611 ms] 7.05 ms (19.0%)
iast 44.777 ms [44.38 ms, 45.175 ms] 7.601 ms (20.4%)
profiling 49.005 ms [48.558 ms, 49.451 ms] 11.828 ms (31.8%)
tracing 44.254 ms [43.882 ms, 44.627 ms] 7.077 ms (19.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.818 ms [37.511 ms, 38.124 ms] -
appsec 48.924 ms [48.481 ms, 49.366 ms] 11.106 ms (29.4%)
code_origins 43.1 ms [42.731 ms, 43.468 ms] 5.282 ms (14.0%)
iast 44.552 ms [44.175 ms, 44.928 ms] 6.734 ms (17.8%)
profiling 50.799 ms [50.319 ms, 51.279 ms] 12.981 ms (34.3%)
tracing 45.089 ms [44.696 ms, 45.481 ms] 7.271 ms (19.2%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~27641dbc53
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.348 ms) : 4296, 4401
.   : milestone, 4348,
iast (9.763 ms) : 9599, 9926
.   : milestone, 9763,
iast_FULL (14.101 ms) : 13810, 14392
.   : milestone, 14101,
iast_GLOBAL (10.981 ms) : 10780, 11182
.   : milestone, 10981,
profiling (9.048 ms) : 8899, 9196
.   : milestone, 9048,
tracing (7.585 ms) : 7474, 7696
.   : milestone, 7585,
section candidate
no_agent (4.372 ms) : 4318, 4426
.   : milestone, 4372,
iast (9.721 ms) : 9558, 9885
.   : milestone, 9721,
iast_FULL (14.344 ms) : 14058, 14629
.   : milestone, 14344,
iast_GLOBAL (10.397 ms) : 10213, 10582
.   : milestone, 10397,
profiling (9.564 ms) : 9415, 9712
.   : milestone, 9564,
tracing (7.747 ms) : 7632, 7861
.   : milestone, 7747,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.348 ms [4.296 ms, 4.401 ms] -
iast 9.763 ms [9.599 ms, 9.926 ms] 5.414 ms (124.5%)
iast_FULL 14.101 ms [13.81 ms, 14.392 ms] 9.753 ms (224.3%)
iast_GLOBAL 10.981 ms [10.78 ms, 11.182 ms] 6.633 ms (152.5%)
profiling 9.048 ms [8.899 ms, 9.196 ms] 4.699 ms (108.1%)
tracing 7.585 ms [7.474 ms, 7.696 ms] 3.237 ms (74.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.372 ms [4.318 ms, 4.426 ms] -
iast 9.721 ms [9.558 ms, 9.885 ms] 5.349 ms (122.3%)
iast_FULL 14.344 ms [14.058 ms, 14.629 ms] 9.971 ms (228.0%)
iast_GLOBAL 10.397 ms [10.213 ms, 10.582 ms] 6.025 ms (137.8%)
profiling 9.564 ms [9.415 ms, 9.712 ms] 5.191 ms (118.7%)
tracing 7.747 ms [7.632 ms, 7.861 ms] 3.374 ms (77.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/4-config-sources
git_commit_date 1758638766 1758643649
git_commit_sha e992b65 5b5ad0d
release_version 1.54.0-SNAPSHOT~e992b65c80 1.53.0-SNAPSHOT~5b5ad0d63e
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1758645668 1758645668
ci_job_id 1143613278 1143613278
ci_pipeline_id 77305571 77305571
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-a7a2p8r1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-a7a2p8r1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
.   : milestone, 1474,
appsec (3.736 ms) : 3519, 3954
.   : milestone, 3736,
iast (2.21 ms) : 2146, 2273
.   : milestone, 2210,
iast_GLOBAL (2.252 ms) : 2188, 2316
.   : milestone, 2252,
profiling (2.065 ms) : 2014, 2117
.   : milestone, 2065,
tracing (2.02 ms) : 1971, 2070
.   : milestone, 2020,
section candidate
no_agent (1.474 ms) : 1463, 1486
.   : milestone, 1474,
appsec (3.742 ms) : 3521, 3962
.   : milestone, 3742,
iast (2.212 ms) : 2148, 2276
.   : milestone, 2212,
iast_GLOBAL (2.241 ms) : 2178, 2305
.   : milestone, 2241,
profiling (2.072 ms) : 2019, 2125
.   : milestone, 2072,
tracing (2.032 ms) : 1982, 2081
.   : milestone, 2032,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.462 ms, 1.485 ms] -
appsec 3.736 ms [3.519 ms, 3.954 ms] 2.263 ms (153.5%)
iast 2.21 ms [2.146 ms, 2.273 ms] 736.203 µs (50.0%)
iast_GLOBAL 2.252 ms [2.188 ms, 2.316 ms] 778.177 µs (52.8%)
profiling 2.065 ms [2.014 ms, 2.117 ms] 591.88 µs (40.2%)
tracing 2.02 ms [1.971 ms, 2.07 ms] 546.715 µs (37.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 3.742 ms [3.521 ms, 3.962 ms] 2.268 ms (153.8%)
iast 2.212 ms [2.148 ms, 2.276 ms] 737.741 µs (50.0%)
iast_GLOBAL 2.241 ms [2.178 ms, 2.305 ms] 767.036 µs (52.0%)
profiling 2.072 ms [2.019 ms, 2.125 ms] 597.639 µs (40.5%)
tracing 2.032 ms [1.982 ms, 2.081 ms] 557.442 µs (37.8%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~5b5ad0d63e, baseline=1.54.0-SNAPSHOT~e992b65c80
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.454 s) : 15454000, 15454000
.   : milestone, 15454000,
appsec (15.133 s) : 15133000, 15133000
.   : milestone, 15133000,
iast (18.341 s) : 18341000, 18341000
.   : milestone, 18341000,
iast_GLOBAL (18.025 s) : 18025000, 18025000
.   : milestone, 18025000,
profiling (15.529 s) : 15529000, 15529000
.   : milestone, 15529000,
tracing (15.136 s) : 15136000, 15136000
.   : milestone, 15136000,
section candidate
no_agent (15.026 s) : 15026000, 15026000
.   : milestone, 15026000,
appsec (15.127 s) : 15127000, 15127000
.   : milestone, 15127000,
iast (18.324 s) : 18324000, 18324000
.   : milestone, 18324000,
iast_GLOBAL (18.293 s) : 18293000, 18293000
.   : milestone, 18293000,
profiling (15.487 s) : 15487000, 15487000
.   : milestone, 15487000,
tracing (15.037 s) : 15037000, 15037000
.   : milestone, 15037000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.454 s [15.454 s, 15.454 s] -
appsec 15.133 s [15.133 s, 15.133 s] -321.0 ms (-2.1%)
iast 18.341 s [18.341 s, 18.341 s] 2.887 s (18.7%)
iast_GLOBAL 18.025 s [18.025 s, 18.025 s] 2.571 s (16.6%)
profiling 15.529 s [15.529 s, 15.529 s] 75.0 ms (0.5%)
tracing 15.136 s [15.136 s, 15.136 s] -318.0 ms (-2.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.026 s [15.026 s, 15.026 s] -
appsec 15.127 s [15.127 s, 15.127 s] 101.0 ms (0.7%)
iast 18.324 s [18.324 s, 18.324 s] 3.298 s (21.9%)
iast_GLOBAL 18.293 s [18.293 s, 18.293 s] 3.267 s (21.7%)
profiling 15.487 s [15.487 s, 15.487 s] 461.0 ms (3.1%)
tracing 15.037 s [15.037 s, 15.037 s] 11.0 ms (0.1%)

@mtoffl01 mtoffl01 force-pushed the mtoff/4-config-sources branch from 67d3e75 to 8becbc5 Compare August 21, 2025 20:44
@mtoffl01 mtoffl01 force-pushed the mtoff/4-config-sources branch from 369b020 to d097300 Compare August 22, 2025 20:44
@mhlidd mhlidd force-pushed the mtoff/4-config-sources branch from 535c685 to 1b81e8a Compare August 29, 2025 15:51
}

/** Helper class to store resolved configuration values with their metadata */
static class ConfigValueResolver<T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is not private in order to expose it for a unit test that is needed to complete code coverage. The unit test verifies that reReportToCollector is not invoked when origin == null, which should never happen since the method to create a ConfigValueResolver should only occur when no re-reporting is expected. This check is only here as a safety check against poor usage of the function.

@mhlidd mhlidd added the tag: do not merge Do not merge changes label Aug 29, 2025
@mhlidd mhlidd marked this pull request as ready for review August 29, 2025 20:41
@mhlidd mhlidd requested review from a team as code owners August 29, 2025 20:41
@mhlidd mhlidd requested review from sarahchen6 and removed request for a team August 29, 2025 20:41
* @param configMap map of configuration key-value pairs to add
* @param origin the configuration origin for all entries
*/
public void putAll(Map<String, Object> configMap, ConfigOrigin origin) {
Copy link
Contributor

@mcculls mcculls Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used by DynamicConfig to report remote config updates - so I would change this to be

Suggested change
public void putAll(Map<String, Object> configMap, ConfigOrigin origin) {
public void putRemote(Map<String, Object> configMap) {

and use ConfigOrigin.REMOTE to get the right sub-map to update.

*/
public void putAll(Map<String, Object> configMap, ConfigOrigin origin) {
for (Map.Entry<String, Object> entry : configMap.entrySet()) {
put(entry.getKey(), entry.getValue(), origin, ABSENT_SEQ_ID, null);
Copy link
Contributor

@mcculls mcculls Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the atomicity of the previous implementation - i.e. with the new code if a remote config update happens at the same time the config is collected for telemetry then half of the remote config update could land in the outgoing batch and the rest would land in the subsequent batch. This could result in inconsistent data being shown in the UI.

I'll add an update to show how the atomicity can be kept with the new sub-map approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
void reReportFinalResult(String key, int finalSeqId) {
if (currentOrigin != ConfigOrigin.DEFAULT && !mergedValue.isEmpty()) {
ConfigCollector.get().put(key, mergedValue, ConfigOrigin.CALCULATED, finalSeqId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if currentOrigin is not DEFAULT and not CALCULATED, i.e. when there is only one contribution

Should we still be reporting it as CALCULATED or should we be using currentOrigin here?

mtoffl01 and others added 5 commits September 23, 2025 11:48
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@mtoffl01 mtoffl01 merged commit 5c66a15 into master Sep 23, 2025
545 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/4-config-sources branch September 23, 2025 18:22
@github-actions github-actions bot added this to the 1.54.0 milestone Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: telemetry Telemetry tag: do not merge Do not merge changes type: enhancement Enhancements and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants