You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constwaveCount=3;// Number of wave cycles across the time range
524
+
constwaveAmplitude=0.15;// 15% amplitude
525
+
514
526
constduplicateQuery=`
515
527
INSERT INTO otel_traces
516
528
SELECT
517
-
-- Adjust timestamp: distribute evenly across configured time range
529
+
-- Adjust timestamp: distribute with wavy pattern across configured time range
518
530
toDateTime64(
519
-
${startTime/1000} +
520
-
((((dense_rank() OVER (ORDER BY original_traces.TraceId, dup_index) - 1) + ${globalTraceOffset}) * ${timeRange/1000/totalTraces}) +
531
+
${startTime/1000} + (
532
+
-- Base position with wave modulation for wavy density pattern
533
+
(((dense_rank() OVER (ORDER BY original_traces.TraceId, dup_index) - 1) + ${globalTraceOffset}) / ${totalTraces}) +
534
+
(sin((((dense_rank() OVER (ORDER BY original_traces.TraceId, dup_index) - 1) + ${globalTraceOffset}) / ${totalTraces}) * ${Math.PI*2*waveCount}) * ${waveAmplitude})
535
+
) * ${timeRange/1000} +
521
536
((toUnixTimestamp64Milli(original_traces.Timestamp) - toUnixTimestamp64Milli(min(original_traces.Timestamp) OVER (PARTITION BY original_traces.TraceId))) / 1000) +
522
-
((sipHash64(original_traces.TraceId, dup_index) % 3600) - 1800)), -- Add ~30 min jitter (deterministic per trace)
537
+
((sipHash64(original_traces.TraceId, dup_index) % 1800) - 900), -- Add ~15 min jitter (deterministic per trace)
0 commit comments