Skip to content
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

Add support for TRACE_HTTP_CLIENT_TAG_QUERY_STRING and change default value of HTTP_CLIENT_TAG_QUERY_STRING #7677

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mhlidd
Copy link

@mhlidd mhlidd commented Sep 24, 2024

What Does This Do

Changes the default value of the HTTP_CLIENT_TAG_QUERY_STRING to have the value of true instead of false to be consistent with other language defaults. Additionally, we add support to handle
the TRACE_HTTP_CLIENT_TAG_QUERY_STRING tag as well as the original HTTP_CLIENT_TAG_QUERY_STRING in efforts to be more consistent with the tags from other languages as well.

Motivation

Our goal is to make the implementation of configuration variables consistent for all languages as part of the config consistency effort listed in the following RFC.

Additional Notes

In Release Notes: Mention the change of the default value and state that the tag can be manually set to false

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@mhlidd mhlidd changed the title testing logs Add support for TRACE_HTTP_CLIENT_TAG_QUERY_STRING and change default value of HTTP_CLIENT_TAG_QUERY_STRING Sep 26, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 26, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/client_tag_query
git_commit_date 1727371427 1727375793
git_commit_sha 1392830 a0a1527
release_version 1.40.0-SNAPSHOT~1392830fdb 1.40.0-SNAPSHOT~a0a1527b4e
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1727377954 1727377954
ci_job_id 653249100 653249100
ci_pipeline_id 45249271 45249271
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069630
Total [baseline] (10.478 s) : 0, 10478300
Agent [candidate] (1.07 s) : 0, 1070188
Total [candidate] (10.404 s) : 0, 10404357
section appsec
Agent [baseline] (1.205 s) : 0, 1204963
Total [baseline] (10.643 s) : 0, 10642749
Agent [candidate] (1.211 s) : 0, 1211142
Total [candidate] (10.668 s) : 0, 10667872
section iast
Agent [baseline] (1.202 s) : 0, 1202056
Total [baseline] (10.894 s) : 0, 10893677
Agent [candidate] (1.194 s) : 0, 1194305
Total [candidate] (10.9 s) : 0, 10900148
section profiling
Agent [baseline] (1.278 s) : 0, 1278489
Total [baseline] (10.591 s) : 0, 10591485
Agent [candidate] (1.269 s) : 0, 1268521
Total [candidate] (10.586 s) : 0, 10585850
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent appsec 1.205 s 135.333 ms (12.7%)
Agent iast 1.202 s 132.426 ms (12.4%)
Agent profiling 1.278 s 208.859 ms (19.5%)
Total tracing 10.478 s -
Total appsec 10.643 s 164.45 ms (1.6%)
Total iast 10.894 s 415.377 ms (4.0%)
Total profiling 10.591 s 113.185 ms (1.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent appsec 1.211 s 140.954 ms (13.2%)
Agent iast 1.194 s 124.117 ms (11.6%)
Agent profiling 1.269 s 198.333 ms (18.5%)
Total tracing 10.404 s -
Total appsec 10.668 s 263.515 ms (2.5%)
Total iast 10.9 s 495.791 ms (4.8%)
Total profiling 10.586 s 181.492 ms (1.7%)
gantt
    title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.82 ms) : 0, 681820
BytebuddyAgent [candidate] (681.674 ms) : 0, 681674
GlobalTracer [baseline] (311.622 ms) : 0, 311622
GlobalTracer [candidate] (312.015 ms) : 0, 312015
AppSec [baseline] (54.122 ms) : 0, 54122
AppSec [candidate] (54.394 ms) : 0, 54394
Remote Config [baseline] (664.88 µs) : 0, 665
Remote Config [candidate] (678.045 µs) : 0, 678
Telemetry [baseline] (7.676 ms) : 0, 7676
Telemetry [candidate] (7.721 ms) : 0, 7721
section appsec
BytebuddyAgent [baseline] (705.066 ms) : 0, 705066
BytebuddyAgent [candidate] (708.283 ms) : 0, 708283
GlobalTracer [baseline] (304.259 ms) : 0, 304259
GlobalTracer [candidate] (306.062 ms) : 0, 306062
AppSec [baseline] (163.13 ms) : 0, 163130
AppSec [candidate] (163.338 ms) : 0, 163338
Remote Config [baseline] (649.822 µs) : 0, 650
Remote Config [candidate] (644.57 µs) : 0, 645
Telemetry [baseline] (7.793 ms) : 0, 7793
Telemetry [candidate] (8.883 ms) : 0, 8883
IAST [baseline] (20.671 ms) : 0, 20671
IAST [candidate] (20.288 ms) : 0, 20288
section iast
BytebuddyAgent [baseline] (799.655 ms) : 0, 799655
BytebuddyAgent [candidate] (793.624 ms) : 0, 793624
GlobalTracer [baseline] (301.732 ms) : 0, 301732
GlobalTracer [candidate] (300.455 ms) : 0, 300455
AppSec [baseline] (54.382 ms) : 0, 54382
AppSec [candidate] (52.634 ms) : 0, 52634
Remote Config [baseline] (625.996 µs) : 0, 626
Remote Config [candidate] (669.305 µs) : 0, 669
Telemetry [baseline] (7.118 ms) : 0, 7118
Telemetry [candidate] (7.035 ms) : 0, 7035
IAST [baseline] (24.726 ms) : 0, 24726
IAST [candidate] (26.167 ms) : 0, 26167
section profiling
ProfilingAgent [baseline] (97.544 ms) : 0, 97544
ProfilingAgent [candidate] (96.167 ms) : 0, 96167
BytebuddyAgent [baseline] (680.96 ms) : 0, 680960
BytebuddyAgent [candidate] (675.287 ms) : 0, 675287
GlobalTracer [baseline] (397.688 ms) : 0, 397688
GlobalTracer [candidate] (395.518 ms) : 0, 395518
AppSec [baseline] (54.986 ms) : 0, 54986
AppSec [candidate] (54.67 ms) : 0, 54670
Remote Config [baseline] (663.102 µs) : 0, 663
Remote Config [candidate] (660.674 µs) : 0, 661
Telemetry [baseline] (7.572 ms) : 0, 7572
Telemetry [candidate] (7.499 ms) : 0, 7499
Profiling [baseline] (97.567 ms) : 0, 97567
Profiling [candidate] (96.19 ms) : 0, 96190
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.076 s) : 0, 1075923
Total [baseline] (8.592 s) : 0, 8592238
Agent [candidate] (1.07 s) : 0, 1069547
Total [candidate] (8.538 s) : 0, 8538366
section iast
Agent [baseline] (1.193 s) : 0, 1192840
Total [baseline] (9.018 s) : 0, 9018454
Agent [candidate] (1.196 s) : 0, 1195580
Total [candidate] (9.035 s) : 0, 9035201
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.205 s) : 0, 1205059
Total [baseline] (9.042 s) : 0, 9042079
Agent [candidate] (1.203 s) : 0, 1203304
Total [candidate] (9.001 s) : 0, 9000589
section iast_TELEMETRY_OFF
Agent [baseline] (1.19 s) : 0, 1190258
Total [baseline] (9.014 s) : 0, 9013589
Agent [candidate] (1.191 s) : 0, 1190960
Total [candidate] (9.024 s) : 0, 9023740
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.076 s -
Agent iast 1.193 s 116.917 ms (10.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.205 s 129.137 ms (12.0%)
Agent iast_TELEMETRY_OFF 1.19 s 114.335 ms (10.6%)
Total tracing 8.592 s -
Total iast 9.018 s 426.216 ms (5.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.042 s 449.841 ms (5.2%)
Total iast_TELEMETRY_OFF 9.014 s 421.351 ms (4.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent iast 1.196 s 126.033 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.203 s 133.757 ms (12.5%)
Agent iast_TELEMETRY_OFF 1.191 s 121.413 ms (11.4%)
Total tracing 8.538 s -
Total iast 9.035 s 496.835 ms (5.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.001 s 462.223 ms (5.4%)
Total iast_TELEMETRY_OFF 9.024 s 485.374 ms (5.7%)
gantt
    title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.341 ms) : 0, 686341
BytebuddyAgent [candidate] (682.35 ms) : 0, 682350
GlobalTracer [baseline] (312.802 ms) : 0, 312802
GlobalTracer [candidate] (311.233 ms) : 0, 311233
AppSec [baseline] (54.484 ms) : 0, 54484
AppSec [candidate] (53.93 ms) : 0, 53930
Remote Config [baseline] (673.857 µs) : 0, 674
Remote Config [candidate] (666.458 µs) : 0, 666
Telemetry [baseline] (7.799 ms) : 0, 7799
Telemetry [candidate] (7.642 ms) : 0, 7642
section iast
BytebuddyAgent [baseline] (792.734 ms) : 0, 792734
BytebuddyAgent [candidate] (795.508 ms) : 0, 795508
GlobalTracer [baseline] (300.023 ms) : 0, 300023
GlobalTracer [candidate] (300.315 ms) : 0, 300315
AppSec [baseline] (53.919 ms) : 0, 53919
AppSec [candidate] (53.992 ms) : 0, 53992
IAST [baseline] (23.883 ms) : 0, 23883
IAST [candidate] (24.301 ms) : 0, 24301
Remote Config [baseline] (660.789 µs) : 0, 661
Remote Config [candidate] (647.891 µs) : 0, 648
Telemetry [baseline] (7.865 ms) : 0, 7865
Telemetry [candidate] (6.994 ms) : 0, 6994
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (803.622 ms) : 0, 803622
BytebuddyAgent [candidate] (800.151 ms) : 0, 800151
GlobalTracer [baseline] (300.627 ms) : 0, 300627
GlobalTracer [candidate] (302.42 ms) : 0, 302420
AppSec [baseline] (54.421 ms) : 0, 54421
AppSec [candidate] (56.073 ms) : 0, 56073
IAST [baseline] (24.673 ms) : 0, 24673
IAST [candidate] (23.026 ms) : 0, 23026
Remote Config [baseline] (621.51 µs) : 0, 622
Remote Config [candidate] (641.321 µs) : 0, 641
Telemetry [baseline] (7.151 ms) : 0, 7151
Telemetry [candidate] (7.148 ms) : 0, 7148
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (789.89 ms) : 0, 789890
BytebuddyAgent [candidate] (790.742 ms) : 0, 790742
GlobalTracer [baseline] (300.441 ms) : 0, 300441
GlobalTracer [candidate] (300.428 ms) : 0, 300428
AppSec [baseline] (52.863 ms) : 0, 52863
AppSec [candidate] (55.123 ms) : 0, 55123
IAST [baseline] (25.786 ms) : 0, 25786
IAST [candidate] (23.347 ms) : 0, 23347
Remote Config [baseline] (609.88 µs) : 0, 610
Remote Config [candidate] (614.095 µs) : 0, 614
Telemetry [baseline] (6.91 ms) : 0, 6910
Telemetry [candidate] (6.912 ms) : 0, 6912
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-09-26T18:45:12 2024-09-26T18:52:02
git_branch master mhlidd/client_tag_query
git_commit_date 1727371427 1727375793
git_commit_sha 1392830 a0a1527
release_version 1.40.0-SNAPSHOT~1392830fdb 1.40.0-SNAPSHOT~a0a1527b4e
start_time 2024-09-26T18:44:59 2024-09-26T18:51:48
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1727377068 1727377068
ci_job_id 653249101 653249101
ci_pipeline_id 45249271 45249271
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

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

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.333 ms) : 1313, 1352
.   : milestone, 1333,
appsec (1.71 ms) : 1685, 1734
.   : milestone, 1710,
appsec_no_iast (1.747 ms) : 1723, 1772
.   : milestone, 1747,
iast (1.465 ms) : 1443, 1488
.   : milestone, 1465,
profiling (1.464 ms) : 1439, 1488
.   : milestone, 1464,
tracing (1.456 ms) : 1432, 1481
.   : milestone, 1456,
section candidate
no_agent (1.353 ms) : 1334, 1372
.   : milestone, 1353,
appsec (1.711 ms) : 1687, 1735
.   : milestone, 1711,
appsec_no_iast (1.718 ms) : 1694, 1743
.   : milestone, 1718,
iast (1.494 ms) : 1471, 1517
.   : milestone, 1494,
profiling (1.485 ms) : 1461, 1509
.   : milestone, 1485,
tracing (1.474 ms) : 1450, 1498
.   : milestone, 1474,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.333 ms [1.313 ms, 1.352 ms] -
appsec 1.71 ms [1.685 ms, 1.734 ms] 377.235 µs (28.3%)
appsec_no_iast 1.747 ms [1.723 ms, 1.772 ms] 414.448 µs (31.1%)
iast 1.465 ms [1.443 ms, 1.488 ms] 132.82 µs (10.0%)
profiling 1.464 ms [1.439 ms, 1.488 ms] 130.924 µs (9.8%)
tracing 1.456 ms [1.432 ms, 1.481 ms] 123.795 µs (9.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.353 ms [1.334 ms, 1.372 ms] -
appsec 1.711 ms [1.687 ms, 1.735 ms] 358.086 µs (26.5%)
appsec_no_iast 1.718 ms [1.694 ms, 1.743 ms] 365.283 µs (27.0%)
iast 1.494 ms [1.471 ms, 1.517 ms] 141.328 µs (10.4%)
profiling 1.485 ms [1.461 ms, 1.509 ms] 131.952 µs (9.8%)
tracing 1.474 ms [1.45 ms, 1.498 ms] 121.193 µs (9.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb
    dateFormat X
    axisFormat %s
section baseline
no_agent (372.825 µs) : 353, 393
.   : milestone, 373,
iast (486.289 µs) : 465, 507
.   : milestone, 486,
iast_FULL (556.083 µs) : 535, 577
.   : milestone, 556,
iast_GLOBAL (511.494 µs) : 489, 534
.   : milestone, 511,
iast_HARDCODED_SECRET_DISABLED (483.028 µs) : 462, 504
.   : milestone, 483,
iast_INACTIVE (450.744 µs) : 429, 472
.   : milestone, 451,
iast_TELEMETRY_OFF (474.422 µs) : 452, 497
.   : milestone, 474,
tracing (446.845 µs) : 427, 467
.   : milestone, 447,
section candidate
no_agent (370.368 µs) : 350, 391
.   : milestone, 370,
iast (485.315 µs) : 464, 507
.   : milestone, 485,
iast_FULL (555.408 µs) : 534, 577
.   : milestone, 555,
iast_GLOBAL (510.033 µs) : 488, 532
.   : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (489.427 µs) : 468, 511
.   : milestone, 489,
iast_INACTIVE (450.492 µs) : 430, 471
.   : milestone, 450,
iast_TELEMETRY_OFF (473.551 µs) : 451, 496
.   : milestone, 474,
tracing (453.298 µs) : 433, 474
.   : milestone, 453,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 372.825 µs [352.512 µs, 393.139 µs] -
iast 486.289 µs [465.092 µs, 507.487 µs] 113.464 µs (30.4%)
iast_FULL 556.083 µs [534.725 µs, 577.441 µs] 183.258 µs (49.2%)
iast_GLOBAL 511.494 µs [489.28 µs, 533.708 µs] 138.668 µs (37.2%)
iast_HARDCODED_SECRET_DISABLED 483.028 µs [462.093 µs, 503.962 µs] 110.202 µs (29.6%)
iast_INACTIVE 450.744 µs [429.417 µs, 472.071 µs] 77.919 µs (20.9%)
iast_TELEMETRY_OFF 474.422 µs [451.763 µs, 497.081 µs] 101.596 µs (27.3%)
tracing 446.845 µs [426.558 µs, 467.132 µs] 74.02 µs (19.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 370.368 µs [349.52 µs, 391.217 µs] -
iast 485.315 µs [463.791 µs, 506.839 µs] 114.947 µs (31.0%)
iast_FULL 555.408 µs [534.126 µs, 576.691 µs] 185.04 µs (50.0%)
iast_GLOBAL 510.033 µs [487.761 µs, 532.306 µs] 139.665 µs (37.7%)
iast_HARDCODED_SECRET_DISABLED 489.427 µs [467.851 µs, 511.004 µs] 119.059 µs (32.1%)
iast_INACTIVE 450.492 µs [429.718 µs, 471.266 µs] 80.124 µs (21.6%)
iast_TELEMETRY_OFF 473.551 µs [451.218 µs, 495.884 µs] 103.183 µs (27.9%)
tracing 453.298 µs [432.605 µs, 473.991 µs] 82.93 µs (22.4%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/client_tag_query
git_commit_date 1727371427 1727375793
git_commit_sha 1392830 a0a1527
release_version 1.40.0-SNAPSHOT~1392830fdb 1.40.0-SNAPSHOT~a0a1527b4e
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1727377633 1727377633
ci_job_id 653249102 653249102
ci_pipeline_id 45249271 45249271
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

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

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.463 ms) : 1452, 1475
.   : milestone, 1463,
appsec (2.314 ms) : 2273, 2355
.   : milestone, 2314,
iast (2.057 ms) : 2006, 2107
.   : milestone, 2057,
iast_GLOBAL (2.107 ms) : 2056, 2158
.   : milestone, 2107,
profiling (1.93 ms) : 1890, 1971
.   : milestone, 1930,
tracing (1.911 ms) : 1873, 1950
.   : milestone, 1911,
section candidate
no_agent (1.47 ms) : 1458, 1481
.   : milestone, 1470,
appsec (2.323 ms) : 2282, 2364
.   : milestone, 2323,
iast (2.079 ms) : 2027, 2131
.   : milestone, 2079,
iast_GLOBAL (2.082 ms) : 2033, 2132
.   : milestone, 2082,
profiling (1.93 ms) : 1889, 1971
.   : milestone, 1930,
tracing (1.916 ms) : 1877, 1955
.   : milestone, 1916,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.463 ms [1.452 ms, 1.475 ms] -
appsec 2.314 ms [2.273 ms, 2.355 ms] 851.218 µs (58.2%)
iast 2.057 ms [2.006 ms, 2.107 ms] 593.756 µs (40.6%)
iast_GLOBAL 2.107 ms [2.056 ms, 2.158 ms] 644.057 µs (44.0%)
profiling 1.93 ms [1.89 ms, 1.971 ms] 467.24 µs (31.9%)
tracing 1.911 ms [1.873 ms, 1.95 ms] 448.141 µs (30.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.47 ms [1.458 ms, 1.481 ms] -
appsec 2.323 ms [2.282 ms, 2.364 ms] 853.237 µs (58.1%)
iast 2.079 ms [2.027 ms, 2.131 ms] 609.472 µs (41.5%)
iast_GLOBAL 2.082 ms [2.033 ms, 2.132 ms] 612.464 µs (41.7%)
profiling 1.93 ms [1.889 ms, 1.971 ms] 460.489 µs (31.3%)
tracing 1.916 ms [1.877 ms, 1.955 ms] 446.483 µs (30.4%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~a0a1527b4e, baseline=1.40.0-SNAPSHOT~1392830fdb
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.778 s) : 15778000, 15778000
.   : milestone, 15778000,
appsec (15.131 s) : 15131000, 15131000
.   : milestone, 15131000,
iast (19.219 s) : 19219000, 19219000
.   : milestone, 19219000,
iast_GLOBAL (18.091 s) : 18091000, 18091000
.   : milestone, 18091000,
profiling (15.349 s) : 15349000, 15349000
.   : milestone, 15349000,
tracing (15.263 s) : 15263000, 15263000
.   : milestone, 15263000,
section candidate
no_agent (15.178 s) : 15178000, 15178000
.   : milestone, 15178000,
appsec (15.204 s) : 15204000, 15204000
.   : milestone, 15204000,
iast (18.929 s) : 18929000, 18929000
.   : milestone, 18929000,
iast_GLOBAL (17.792 s) : 17792000, 17792000
.   : milestone, 17792000,
profiling (15.5 s) : 15500000, 15500000
.   : milestone, 15500000,
tracing (15.098 s) : 15098000, 15098000
.   : milestone, 15098000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.778 s [15.778 s, 15.778 s] -
appsec 15.131 s [15.131 s, 15.131 s] -647.0 ms (-4.1%)
iast 19.219 s [19.219 s, 19.219 s] 3.441 s (21.8%)
iast_GLOBAL 18.091 s [18.091 s, 18.091 s] 2.313 s (14.7%)
profiling 15.349 s [15.349 s, 15.349 s] -429.0 ms (-2.7%)
tracing 15.263 s [15.263 s, 15.263 s] -515.0 ms (-3.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.178 s [15.178 s, 15.178 s] -
appsec 15.204 s [15.204 s, 15.204 s] 26.0 ms (0.2%)
iast 18.929 s [18.929 s, 18.929 s] 3.751 s (24.7%)
iast_GLOBAL 17.792 s [17.792 s, 17.792 s] 2.614 s (17.2%)
profiling 15.5 s [15.5 s, 15.5 s] 322.0 ms (2.1%)
tracing 15.098 s [15.098 s, 15.098 s] -80.0 ms (-0.5%)

@mhlidd mhlidd marked this pull request as ready for review September 26, 2024 15:42
@mhlidd mhlidd requested review from a team as code owners September 26, 2024 15:42
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Is the PR ready for review? I can see a bunch of leftovers 🤔

If not, thank for using draft as mentioned in contribution guidelines 🙏

@mhlidd
Copy link
Author

mhlidd commented Sep 26, 2024

Is the PR ready for review? I can see a bunch of leftovers 🤔

If not, thank for using draft as mentioned in contribution guidelines 🙏

Accidentally marked as ready earlier. Code has been cleaned up and is ready for review! 🙇
@PerfectSlayer

Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

About test changes, it feels this duplicate the test url handling for #url test twice without adding new behavior test. If the goal is to test the setting is well applied, it is already covered through config name alias tests.

If you still want have a test for this behavior, I would recommend creating a parametric tests with all possible user config combinations (new config to null, true, false + old config to new, true, false) and only checking at the value the config returns (from Config.isHttpClientTagQueryString()).

@@ -1295,7 +1295,9 @@ private Config(final ConfigProvider configProvider, final InstrumenterConfig ins

httpClientTagQueryString =
configProvider.getBoolean(
HTTP_CLIENT_TAG_QUERY_STRING, DEFAULT_HTTP_CLIENT_TAG_QUERY_STRING);
"trace." + HTTP_CLIENT_TAG_QUERY_STRING,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you create a dedicated constant near to the legacy one, and deprecate the older one using@Deprecated and some Javadoc comment?

Copy link
Author

Choose a reason for hiding this comment

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

This was a conversation I had with @mcculls, who proposed that we go through with this solution as it is already used in other config scenarios. Do you think that we should change this implementation to have a dedicated constant that does this?
public static final String TRACE_HTTP_SERVER_TAG_QUERY_STRING = "trace.http.server.tag.query-string";

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think that we should change this implementation to have a dedicated constant that does this?

Exactly. The main rationale is that we usually do a text search for a configuration key to find out how it is used in the code base. When using "trace." + HTTP_CLIENT_TAG_QUERY_STRING, we won't be able to find it 😞

@@ -98,6 +100,110 @@ class HttpClientDecoratorTest extends ClientDecoratorTest {
req = [url: url == null ? null : new URI(url)]
}

def "test url handling for #url : trace env var"() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than differentiating these tests with "default env var" and "trace env var," I'd suggest actually using the env var names (Because "default" didn't mean anything to me until I read "trace"): DD_HTTP_CLIENT_TAG_QUERY_STRING and DD_TRACE_HTTP_CLIENT_TAG_QUERY_STRING.

Not sure if this conflicts with Java standards, but just my two cents from a generic code reader

Copy link
Contributor

Choose a reason for hiding this comment

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

Spock test methods does not have to respect Java standards, so we're good here.

But if we really want to test the behavior with all the different config values (I started a discussion with @mhlidd already as it feels more like testing config rather than testing the HTTP client decorator), I would recommend creating test child classes, having the config setting / retrieval in the parent abstract method. -- and here, the class name will have to respect the standards 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants