Skip to content

Commit 9046d16

Browse files
committed
Add more diagnostics
1 parent c5c9315 commit 9046d16

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/instrumentation/libraries/e2e-common/base-entrypoint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,19 @@ if [ "$TRACE_COUNT" -eq 0 ]; then
266266
exit 1
267267
fi
268268

269+
# Print focused trace-presence diagnostics for flaky SQL replay mismatches.
270+
# This helps distinguish "not recorded" from "recorded but not matched in replay".
271+
log "Trace SQL presence checks (recorded traces):" "$BLUE"
272+
SQL_PATTERNS=(
273+
"SELECT COUNT\\(\\*\\) as total FROM test_users"
274+
"SAVEPOINT"
275+
"ROLLBACK"
276+
)
277+
for pattern in "${SQL_PATTERNS[@]}"; do
278+
count=$(grep -R -E -c "$pattern" .tusk/traces 2>/dev/null | awk -F: '{s+=$2} END {print s+0}')
279+
log " pattern='$pattern' count=$count" "$BLUE"
280+
done
281+
269282
# ============================================================
270283
# Phase 3: Run Tusk Tests
271284
# ============================================================

0 commit comments

Comments
 (0)