Closed
Conversation
Fix two intermittent test failures in SynapseTest: 1. URL tag assertion: The http.url tag sometimes includes the query string (?wsdl) even though the query is captured separately in DDTags.HTTP_QUERY. Updated the serverSpan assertion to accept the URL with or without the query string. 2. Extra trace in client test: The proxy request test sometimes produces 3 traces instead of the expected 2 due to internal Synapse activity. Replaced the strict assertTraces(2) with a manual assertion that waits for at least 2 traces and validates the expected traces by their content rather than count. The existing @flaky annotations are preserved for the timeout issue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The actual assertion failures are fixed in this PR. The timeout issue these annotations referenced appears to be resolved.
Reformat single-line closure to multi-line as required by spotless CI check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The proxy trace and server trace can contain extra internal Synapse spans, making size() == 2 and size() == 1 assertions flaky. Replace with flexible assertions that find specific spans by resource name and verify distributed tracing correctness regardless of total span count. Also tighten serverTrace matching to use any() instead of every() so extra internal spans in a trace don't prevent the trace from being selected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…traces The proxy and client spans can be distributed across traces differently in different JVM/CI environments. Search all traces for spans by type (HTTP_CLIENT vs HTTP_SERVER) and resource name, rather than assuming they appear in a specific trace. This eliminates the fragile per-trace size assertions and trace-membership assumptions while still validating the key behavioral invariants: - Proxy server span is created - HTTP client span for the forwarded call is created - Distributed tracing works (client and server spans share traceId) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1054494
Total [baseline] (8.81 s) : 0, 8810329
Agent [candidate] (1.053 s) : 0, 1052630
Total [candidate] (8.798 s) : 0, 8798220
section iast
Agent [baseline] (1.243 s) : 0, 1242613
Total [baseline] (9.566 s) : 0, 9565583
Agent [candidate] (1.225 s) : 0, 1224999
Total [candidate] (9.542 s) : 0, 9542257
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.219 ms) : 0, 1219
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (626.575 ms) : 0, 626575
BytebuddyAgent [candidate] (625.105 ms) : 0, 625105
AgentMeter [baseline] (28.975 ms) : 0, 28975
AgentMeter [candidate] (29.019 ms) : 0, 29019
GlobalTracer [baseline] (256.452 ms) : 0, 256452
GlobalTracer [candidate] (255.831 ms) : 0, 255831
AppSec [baseline] (31.622 ms) : 0, 31622
AppSec [candidate] (31.461 ms) : 0, 31461
Debugger [baseline] (58.718 ms) : 0, 58718
Debugger [candidate] (58.567 ms) : 0, 58567
Remote Config [baseline] (603.263 µs) : 0, 603
Remote Config [candidate] (583.069 µs) : 0, 583
Telemetry [baseline] (8.618 ms) : 0, 8618
Telemetry [candidate] (8.64 ms) : 0, 8640
Flare Poller [baseline] (5.724 ms) : 0, 5724
Flare Poller [candidate] (6.436 ms) : 0, 6436
section iast
crashtracking [baseline] (1.209 ms) : 0, 1209
crashtracking [candidate] (1.202 ms) : 0, 1202
BytebuddyAgent [baseline] (809.342 ms) : 0, 809342
BytebuddyAgent [candidate] (795.332 ms) : 0, 795332
AgentMeter [baseline] (11.745 ms) : 0, 11745
AgentMeter [candidate] (11.307 ms) : 0, 11307
GlobalTracer [baseline] (248.996 ms) : 0, 248996
GlobalTracer [candidate] (246.863 ms) : 0, 246863
AppSec [baseline] (26.722 ms) : 0, 26722
AppSec [candidate] (26.314 ms) : 0, 26314
Debugger [baseline] (62.755 ms) : 0, 62755
Debugger [candidate] (62.54 ms) : 0, 62540
Remote Config [baseline] (519.107 µs) : 0, 519
Remote Config [candidate] (521.955 µs) : 0, 522
Telemetry [baseline] (14.743 ms) : 0, 14743
Telemetry [candidate] (14.862 ms) : 0, 14862
Flare Poller [baseline] (4.824 ms) : 0, 4824
Flare Poller [candidate] (4.861 ms) : 0, 4861
IAST [baseline] (25.492 ms) : 0, 25492
IAST [candidate] (25.176 ms) : 0, 25176
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.06 s) : 0, 1060117
Total [baseline] (10.993 s) : 0, 10992877
Agent [candidate] (1.06 s) : 0, 1060463
Total [candidate] (10.982 s) : 0, 10981571
section appsec
Agent [baseline] (1.254 s) : 0, 1253554
Total [baseline] (11.164 s) : 0, 11163872
Agent [candidate] (1.252 s) : 0, 1251862
Total [candidate] (11.19 s) : 0, 11190464
section iast
Agent [baseline] (1.233 s) : 0, 1232692
Total [baseline] (11.385 s) : 0, 11385074
Agent [candidate] (1.226 s) : 0, 1225957
Total [candidate] (10.604 s) : 0, 10603805
section profiling
Agent [baseline] (1.18 s) : 0, 1179733
Total [baseline] (10.967 s) : 0, 10967278
Agent [candidate] (1.181 s) : 0, 1180736
Total [candidate] (11.057 s) : 0, 11056814
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (628.259 ms) : 0, 628259
BytebuddyAgent [candidate] (629.753 ms) : 0, 629753
AgentMeter [baseline] (29.106 ms) : 0, 29106
AgentMeter [candidate] (29.212 ms) : 0, 29212
GlobalTracer [baseline] (256.917 ms) : 0, 256917
GlobalTracer [candidate] (256.855 ms) : 0, 256855
AppSec [baseline] (31.594 ms) : 0, 31594
AppSec [candidate] (31.672 ms) : 0, 31672
Debugger [baseline] (59.343 ms) : 0, 59343
Debugger [candidate] (59.353 ms) : 0, 59353
Remote Config [baseline] (580.289 µs) : 0, 580
Remote Config [candidate] (582.502 µs) : 0, 583
Telemetry [baseline] (8.582 ms) : 0, 8582
Telemetry [candidate] (8.529 ms) : 0, 8529
Flare Poller [baseline] (8.561 ms) : 0, 8561
Flare Poller [candidate] (7.224 ms) : 0, 7224
section appsec
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.19 ms) : 0, 1190
BytebuddyAgent [baseline] (663.117 ms) : 0, 663117
BytebuddyAgent [candidate] (662.443 ms) : 0, 662443
AgentMeter [baseline] (12.127 ms) : 0, 12127
AgentMeter [candidate] (12.086 ms) : 0, 12086
GlobalTracer [baseline] (259.821 ms) : 0, 259821
GlobalTracer [candidate] (259.229 ms) : 0, 259229
AppSec [baseline] (177.951 ms) : 0, 177951
AppSec [candidate] (177.258 ms) : 0, 177258
Debugger [baseline] (65.832 ms) : 0, 65832
Debugger [candidate] (65.205 ms) : 0, 65205
Remote Config [baseline] (576.349 µs) : 0, 576
Remote Config [candidate] (581.633 µs) : 0, 582
Telemetry [baseline] (8.971 ms) : 0, 8971
Telemetry [candidate] (9.839 ms) : 0, 9839
Flare Poller [baseline] (3.655 ms) : 0, 3655
Flare Poller [candidate] (3.678 ms) : 0, 3678
IAST [baseline] (24.09 ms) : 0, 24090
IAST [candidate] (24.057 ms) : 0, 24057
section iast
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.19 ms) : 0, 1190
BytebuddyAgent [baseline] (800.262 ms) : 0, 800262
BytebuddyAgent [candidate] (795.688 ms) : 0, 795688
AgentMeter [baseline] (11.375 ms) : 0, 11375
AgentMeter [candidate] (11.326 ms) : 0, 11326
GlobalTracer [baseline] (248.448 ms) : 0, 248448
GlobalTracer [candidate] (247.012 ms) : 0, 247012
AppSec [baseline] (26.515 ms) : 0, 26515
AppSec [candidate] (27.116 ms) : 0, 27116
Debugger [baseline] (68.06 ms) : 0, 68060
Debugger [candidate] (65.778 ms) : 0, 65778
Remote Config [baseline] (544.194 µs) : 0, 544
Remote Config [candidate] (532.435 µs) : 0, 532
Telemetry [baseline] (11.231 ms) : 0, 11231
Telemetry [candidate] (12.324 ms) : 0, 12324
Flare Poller [baseline] (3.815 ms) : 0, 3815
Flare Poller [candidate] (3.972 ms) : 0, 3972
IAST [baseline] (25.239 ms) : 0, 25239
IAST [candidate] (25.074 ms) : 0, 25074
section profiling
crashtracking [baseline] (1.164 ms) : 0, 1164
crashtracking [candidate] (1.166 ms) : 0, 1166
BytebuddyAgent [baseline] (681.677 ms) : 0, 681677
BytebuddyAgent [candidate] (682.056 ms) : 0, 682056
AgentMeter [baseline] (8.59 ms) : 0, 8590
AgentMeter [candidate] (8.622 ms) : 0, 8622
GlobalTracer [baseline] (214.965 ms) : 0, 214965
GlobalTracer [candidate] (215.076 ms) : 0, 215076
AppSec [baseline] (31.802 ms) : 0, 31802
AppSec [candidate] (31.95 ms) : 0, 31950
Debugger [baseline] (64.382 ms) : 0, 64382
Debugger [candidate] (65.314 ms) : 0, 65314
Remote Config [baseline] (598.981 µs) : 0, 599
Remote Config [candidate] (584.226 µs) : 0, 584
Telemetry [baseline] (8.907 ms) : 0, 8907
Telemetry [candidate] (8.163 ms) : 0, 8163
Flare Poller [baseline] (3.447 ms) : 0, 3447
Flare Poller [candidate] (3.441 ms) : 0, 3441
ProfilingAgent [baseline] (93.514 ms) : 0, 93514
ProfilingAgent [candidate] (93.835 ms) : 0, 93835
Profiling [baseline] (94.077 ms) : 0, 94077
Profiling [candidate] (94.404 ms) : 0, 94404
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 3 performance regressions! Performance is the same for 14 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section baseline
no_agent (19.088 ms) : 18893, 19283
. : milestone, 19088,
appsec (18.618 ms) : 18429, 18808
. : milestone, 18618,
code_origins (17.793 ms) : 17615, 17970
. : milestone, 17793,
iast (17.669 ms) : 17495, 17844
. : milestone, 17669,
profiling (18.734 ms) : 18549, 18919
. : milestone, 18734,
tracing (17.669 ms) : 17493, 17846
. : milestone, 17669,
section candidate
no_agent (17.197 ms) : 17025, 17368
. : milestone, 17197,
appsec (18.719 ms) : 18531, 18907
. : milestone, 18719,
code_origins (17.915 ms) : 17736, 18093
. : milestone, 17915,
iast (17.849 ms) : 17673, 18025
. : milestone, 17849,
profiling (19.735 ms) : 19534, 19936
. : milestone, 19735,
tracing (17.756 ms) : 17579, 17934
. : milestone, 17756,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section baseline
no_agent (1.189 ms) : 1177, 1201
. : milestone, 1189,
iast (3.097 ms) : 3057, 3137
. : milestone, 3097,
iast_FULL (6.003 ms) : 5942, 6065
. : milestone, 6003,
iast_GLOBAL (3.558 ms) : 3505, 3612
. : milestone, 3558,
profiling (2.304 ms) : 2283, 2326
. : milestone, 2304,
tracing (1.87 ms) : 1853, 1887
. : milestone, 1870,
section candidate
no_agent (1.171 ms) : 1160, 1182
. : milestone, 1171,
iast (3.22 ms) : 3176, 3264
. : milestone, 3220,
iast_FULL (5.87 ms) : 5811, 5930
. : milestone, 5870,
iast_GLOBAL (3.452 ms) : 3406, 3498
. : milestone, 3452,
profiling (2.034 ms) : 2016, 2052
. : milestone, 2034,
tracing (1.815 ms) : 1799, 1831
. : milestone, 1815,
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.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section baseline
no_agent (14.873 s) : 14873000, 14873000
. : milestone, 14873000,
appsec (14.843 s) : 14843000, 14843000
. : milestone, 14843000,
iast (18.203 s) : 18203000, 18203000
. : milestone, 18203000,
iast_GLOBAL (17.752 s) : 17752000, 17752000
. : milestone, 17752000,
profiling (14.811 s) : 14811000, 14811000
. : milestone, 14811000,
tracing (15.11 s) : 15110000, 15110000
. : milestone, 15110000,
section candidate
no_agent (14.8 s) : 14800000, 14800000
. : milestone, 14800000,
appsec (14.806 s) : 14806000, 14806000
. : milestone, 14806000,
iast (18.033 s) : 18033000, 18033000
. : milestone, 18033000,
iast_GLOBAL (18.027 s) : 18027000, 18027000
. : milestone, 18027000,
profiling (15.691 s) : 15691000, 15691000
. : milestone, 15691000,
tracing (15.133 s) : 15133000, 15133000
. : milestone, 15133000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~4db94c993a, baseline=1.61.0-SNAPSHOT~cc122288e5
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
. : milestone, 1471,
appsec (3.745 ms) : 3527, 3962
. : milestone, 3745,
iast (2.25 ms) : 2180, 2319
. : milestone, 2250,
iast_GLOBAL (2.3 ms) : 2230, 2370
. : milestone, 2300,
profiling (2.114 ms) : 2057, 2171
. : milestone, 2114,
tracing (2.084 ms) : 2030, 2138
. : milestone, 2084,
section candidate
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (3.79 ms) : 3570, 4010
. : milestone, 3790,
iast (2.255 ms) : 2185, 2324
. : milestone, 2255,
iast_GLOBAL (2.295 ms) : 2225, 2365
. : milestone, 2295,
profiling (2.114 ms) : 2057, 2172
. : milestone, 2114,
tracing (2.072 ms) : 2018, 2126
. : milestone, 2072,
|
Replace the minimal span-existence-only assertions added to tolerate extra traces with full TraceAssert.assertTrace() calls using the existing serverSpan/proxySpan/clientSpan helpers. The test now validates service name, operation name, resource name, span type, error flag, parent–child relationships, tags (component, span kind, HTTP method/status/URL, peer IP/port), and distributed tracing — while still tolerating the variable number of internal Synapse traces by locating each expected trace by its root span resource name before asserting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What Does This Do
Fixes intermittent assertion failures in
SynapseV0ForkedTestandSynapseV1ForkedTestand removes all@Flakyannotations.Motivation
Two distinct flake patterns:
Flake 1: URL Tag Mismatch
The
http.urltag sometimes includes the query string (/services/SimpleStockQuoteService?wsdl) but the assertion expected only the path. This is non-deterministic Synapse internal behavior — the query is already captured separately inDDTags.HTTP_QUERY.Fix: Changed the
serverSpanhelper'sHTTP_URLassertion from exact string match to a closure that accepts either form: path-only or path+query when a query is present.Flake 2: Extra Trace Count in Proxy Test
assertTraces(2, SORT_TRACES_BY_NAMES)sometimes finds 3 traces because Synapse's proxy request handling can produce an additional trace from internal activity.Fix: Replaced the strict
assertTraces(2)with a flexible approach that:TEST_WRITER.waitForTraces(2)TraceAssert.assertTrace()with the existingserverSpan(),proxySpan(), andclientSpan()helpers to verify all span attributes (service name, operation name, tags, parent-child relationships)Test intention preserved: All original tag, attribute, and relationship assertions are maintained through the existing helper methods — the only change is tolerating extra traces from Synapse internals.
Additional Notes
@Flakyannotations removed fromSynapseTest,SynapseV0ForkedTest, andSynapseV1ForkedTestJira ticket: N/A
🤖 Generated with Claude Code