Check known W3C propagation tags first when parsing#8597
Merged
Conversation
This avoids triggering a misleading log message from TagKey, for example: DEBUG d.t.core.propagation.ptags.TagKey - Invalid header h: W3C s: dd=p:456789abcdef0123 b: 3 e: 4 This is not an invalid header, it's just that TagKey rejected the 'p:' last parent trace-id because it didn't start with the 't.' prefix for custom tags. The code then falls back to checking known W3C propagation tags 's:', 'o:', and 'p:' - if we check for those first we can avoid the misleading message.
amarziali
approved these changes
Mar 20, 2025
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048585
Total [baseline] (8.693 s) : 0, 8692621
Agent [candidate] (1.055 s) : 0, 1055479
Total [candidate] (8.711 s) : 0, 8710567
section iast
Agent [baseline] (1.172 s) : 0, 1171801
Total [baseline] (9.284 s) : 0, 9283828
Agent [candidate] (1.173 s) : 0, 1172816
Total [candidate] (9.237 s) : 0, 9236667
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.179 s) : 0, 1179206
Total [baseline] (9.224 s) : 0, 9223988
Agent [candidate] (1.178 s) : 0, 1178426
Total [candidate] (9.252 s) : 0, 9251805
section iast_TELEMETRY_OFF
Agent [baseline] (1.173 s) : 0, 1173231
Total [baseline] (9.229 s) : 0, 9229228
Agent [candidate] (1.168 s) : 0, 1167792
Total [candidate] (9.211 s) : 0, 9210842
gantt
title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.216 ms) : 0, 723216
BytebuddyAgent [candidate] (728.058 ms) : 0, 728058
GlobalTracer [baseline] (240.476 ms) : 0, 240476
GlobalTracer [candidate] (242.499 ms) : 0, 242499
AppSec [baseline] (55.071 ms) : 0, 55071
AppSec [candidate] (55.072 ms) : 0, 55072
Remote Config [baseline] (698.329 µs) : 0, 698
Remote Config [candidate] (694.322 µs) : 0, 694
Telemetry [baseline] (13.09 ms) : 0, 13090
Telemetry [candidate] (13.089 ms) : 0, 13089
section iast
BytebuddyAgent [baseline] (837.643 ms) : 0, 837643
BytebuddyAgent [candidate] (838.211 ms) : 0, 838211
GlobalTracer [baseline] (229.939 ms) : 0, 229939
GlobalTracer [candidate] (230.188 ms) : 0, 230188
IAST [baseline] (22.792 ms) : 0, 22792
IAST [candidate] (23.755 ms) : 0, 23755
AppSec [baseline] (56.233 ms) : 0, 56233
AppSec [candidate] (55.49 ms) : 0, 55490
Remote Config [baseline] (625.121 µs) : 0, 625
Remote Config [candidate] (611.237 µs) : 0, 611
Telemetry [baseline] (8.697 ms) : 0, 8697
Telemetry [candidate] (8.653 ms) : 0, 8653
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (841.235 ms) : 0, 841235
BytebuddyAgent [candidate] (841.138 ms) : 0, 841138
GlobalTracer [baseline] (232.417 ms) : 0, 232417
GlobalTracer [candidate] (232.395 ms) : 0, 232395
IAST [baseline] (23.303 ms) : 0, 23303
IAST [candidate] (23.068 ms) : 0, 23068
AppSec [baseline] (56.651 ms) : 0, 56651
AppSec [candidate] (56.341 ms) : 0, 56341
Remote Config [baseline] (624.715 µs) : 0, 625
Remote Config [candidate] (635.289 µs) : 0, 635
Telemetry [baseline] (8.831 ms) : 0, 8831
Telemetry [candidate] (8.767 ms) : 0, 8767
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (839.093 ms) : 0, 839093
BytebuddyAgent [candidate] (834.102 ms) : 0, 834102
GlobalTracer [baseline] (230.515 ms) : 0, 230515
GlobalTracer [candidate] (230.124 ms) : 0, 230124
IAST [baseline] (23.141 ms) : 0, 23141
IAST [candidate] (22.3 ms) : 0, 22300
AppSec [baseline] (55.216 ms) : 0, 55216
AppSec [candidate] (56.17 ms) : 0, 56170
Remote Config [baseline] (616.424 µs) : 0, 616
Remote Config [candidate] (607.374 µs) : 0, 607
Telemetry [baseline] (8.689 ms) : 0, 8689
Telemetry [candidate] (8.537 ms) : 0, 8537
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.037 s) : 0, 1037320
Total [baseline] (10.468 s) : 0, 10468446
Agent [candidate] (1.042 s) : 0, 1042482
Total [candidate] (10.489 s) : 0, 10489231
section appsec
Agent [baseline] (1.183 s) : 0, 1182941
Total [baseline] (10.75 s) : 0, 10750454
Agent [candidate] (1.19 s) : 0, 1190458
Total [candidate] (10.856 s) : 0, 10855865
section iast
Agent [baseline] (1.183 s) : 0, 1182520
Total [baseline] (10.993 s) : 0, 10993218
Agent [candidate] (1.171 s) : 0, 1171302
Total [candidate] (10.952 s) : 0, 10952156
section profiling
Agent [baseline] (1.26 s) : 0, 1260109
Total [baseline] (10.828 s) : 0, 10827722
Agent [candidate] (1.259 s) : 0, 1259308
Total [candidate] (10.874 s) : 0, 10873587
gantt
title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (716.527 ms) : 0, 716527
BytebuddyAgent [candidate] (717.75 ms) : 0, 717750
GlobalTracer [baseline] (238.63 ms) : 0, 238630
GlobalTracer [candidate] (239.364 ms) : 0, 239364
AppSec [baseline] (54.782 ms) : 0, 54782
AppSec [candidate] (54.459 ms) : 0, 54459
Remote Config [baseline] (699.677 µs) : 0, 700
Remote Config [candidate] (684.25 µs) : 0, 684
Telemetry [baseline] (10.796 ms) : 0, 10796
Telemetry [candidate] (14.308 ms) : 0, 14308
section appsec
BytebuddyAgent [baseline] (735.492 ms) : 0, 735492
BytebuddyAgent [candidate] (740.255 ms) : 0, 740255
GlobalTracer [baseline] (235.783 ms) : 0, 235783
GlobalTracer [candidate] (237.265 ms) : 0, 237265
IAST [baseline] (21.536 ms) : 0, 21536
IAST [candidate] (21.761 ms) : 0, 21761
AppSec [baseline] (175.704 ms) : 0, 175704
AppSec [candidate] (177.017 ms) : 0, 177017
Remote Config [baseline] (659.649 µs) : 0, 660
Remote Config [candidate] (683.681 µs) : 0, 684
Telemetry [baseline] (8.57 ms) : 0, 8570
Telemetry [candidate] (8.374 ms) : 0, 8374
section iast
BytebuddyAgent [baseline] (846.033 ms) : 0, 846033
BytebuddyAgent [candidate] (837.705 ms) : 0, 837705
GlobalTracer [baseline] (231.423 ms) : 0, 231423
GlobalTracer [candidate] (230.151 ms) : 0, 230151
IAST [baseline] (23.158 ms) : 0, 23158
IAST [candidate] (22.66 ms) : 0, 22660
AppSec [baseline] (56.499 ms) : 0, 56499
AppSec [candidate] (55.635 ms) : 0, 55635
Remote Config [baseline] (617.287 µs) : 0, 617
Remote Config [candidate] (598.586 µs) : 0, 599
Telemetry [baseline] (8.765 ms) : 0, 8765
Telemetry [candidate] (8.633 ms) : 0, 8633
section profiling
BytebuddyAgent [baseline] (708.359 ms) : 0, 708359
BytebuddyAgent [candidate] (709.288 ms) : 0, 709288
GlobalTracer [baseline] (349.522 ms) : 0, 349522
GlobalTracer [candidate] (349.48 ms) : 0, 349480
AppSec [baseline] (54.147 ms) : 0, 54147
AppSec [candidate] (53.654 ms) : 0, 53654
Remote Config [baseline] (714.909 µs) : 0, 715
Remote Config [candidate] (697.312 µs) : 0, 697
Telemetry [baseline] (8.921 ms) : 0, 8921
Telemetry [candidate] (8.882 ms) : 0, 8882
ProfilingAgent [baseline] (96.993 ms) : 0, 96993
ProfilingAgent [candidate] (95.876 ms) : 0, 95876
Profiling [baseline] (97.018 ms) : 0, 97018
Profiling [candidate] (95.902 ms) : 0, 95902
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 14 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section baseline
no_agent (389.961 µs) : 369, 411
. : milestone, 390,
iast (518.826 µs) : 496, 541
. : milestone, 519,
iast_FULL (734.638 µs) : 713, 757
. : milestone, 735,
iast_GLOBAL (564.024 µs) : 542, 586
. : milestone, 564,
iast_HARDCODED_SECRET_DISABLED (516.926 µs) : 495, 539
. : milestone, 517,
iast_INACTIVE (467.668 µs) : 446, 489
. : milestone, 468,
iast_TELEMETRY_OFF (504.79 µs) : 483, 527
. : milestone, 505,
tracing (465.049 µs) : 444, 487
. : milestone, 465,
section candidate
no_agent (384.974 µs) : 365, 405
. : milestone, 385,
iast (516.496 µs) : 495, 538
. : milestone, 516,
iast_FULL (732.057 µs) : 710, 754
. : milestone, 732,
iast_GLOBAL (556.818 µs) : 535, 578
. : milestone, 557,
iast_HARDCODED_SECRET_DISABLED (515.741 µs) : 494, 538
. : milestone, 516,
iast_INACTIVE (468.317 µs) : 447, 490
. : milestone, 468,
iast_TELEMETRY_OFF (507.258 µs) : 485, 529
. : milestone, 507,
tracing (460.545 µs) : 440, 481
. : milestone, 461,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section baseline
no_agent (1.337 ms) : 1318, 1357
. : milestone, 1337,
appsec (1.74 ms) : 1717, 1764
. : milestone, 1740,
appsec_no_iast (1.736 ms) : 1712, 1761
. : milestone, 1736,
code_origins (1.659 ms) : 1632, 1686
. : milestone, 1659,
iast (1.515 ms) : 1491, 1539
. : milestone, 1515,
profiling (1.562 ms) : 1537, 1588
. : milestone, 1562,
tracing (1.494 ms) : 1469, 1520
. : milestone, 1494,
section candidate
no_agent (1.359 ms) : 1340, 1378
. : milestone, 1359,
appsec (1.751 ms) : 1727, 1774
. : milestone, 1751,
appsec_no_iast (1.725 ms) : 1700, 1750
. : milestone, 1725,
code_origins (1.703 ms) : 1677, 1730
. : milestone, 1703,
iast (1.515 ms) : 1490, 1540
. : milestone, 1515,
profiling (1.532 ms) : 1507, 1556
. : milestone, 1532,
tracing (1.507 ms) : 1483, 1532
. : milestone, 1507,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section baseline
no_agent (14.871 s) : 14871000, 14871000
. : milestone, 14871000,
appsec (15.012 s) : 15012000, 15012000
. : milestone, 15012000,
iast (19.085 s) : 19085000, 19085000
. : milestone, 19085000,
iast_GLOBAL (18.283 s) : 18283000, 18283000
. : milestone, 18283000,
profiling (15.03 s) : 15030000, 15030000
. : milestone, 15030000,
tracing (15.178 s) : 15178000, 15178000
. : milestone, 15178000,
section candidate
no_agent (15.47 s) : 15470000, 15470000
. : milestone, 15470000,
appsec (15.143 s) : 15143000, 15143000
. : milestone, 15143000,
iast (18.727 s) : 18727000, 18727000
. : milestone, 18727000,
iast_GLOBAL (18.066 s) : 18066000, 18066000
. : milestone, 18066000,
profiling (15.224 s) : 15224000, 15224000
. : milestone, 15224000,
tracing (14.767 s) : 14767000, 14767000
. : milestone, 14767000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~277152fa47, baseline=1.48.0-SNAPSHOT~1b1f8bc4a2
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (2.343 ms) : 2299, 2387
. : milestone, 2343,
iast (2.123 ms) : 2068, 2179
. : milestone, 2123,
iast_GLOBAL (2.165 ms) : 2108, 2221
. : milestone, 2165,
profiling (2.444 ms) : 2263, 2625
. : milestone, 2444,
tracing (1.949 ms) : 1906, 1991
. : milestone, 1949,
section candidate
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.339 ms) : 2296, 2383
. : milestone, 2339,
iast (2.112 ms) : 2057, 2168
. : milestone, 2112,
iast_GLOBAL (2.158 ms) : 2102, 2214
. : milestone, 2158,
profiling (1.983 ms) : 1937, 2029
. : milestone, 1983,
tracing (1.945 ms) : 1902, 1988
. : milestone, 1945,
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This avoids triggering a misleading log message from TagKey, for example:
This is not an invalid header, it's just that TagKey rejected the 'p:' last parent trace-id because it didn't start with the 't.' prefix for custom tags. The code then falls back to checking known W3C propagation tags 's:', 'o:', and 'p:' - if we check for those first we can avoid the misleading message.
Before: running the W3C propagation tests led to ~100 "Invalid header" messages, the majority of them misleading.
After: running the W3C propagation tests produces only 8 "Invalid header" messages, all expected.