Skip to content

Commit 527bf1e

Browse files
authored
ci: require inbound replay span for e2e tests (#72)
1 parent 14f6e21 commit 527bf1e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

drift/core/tracing/td_span_processor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ def on_end(self, span: ReadableSpan) -> None:
171171
replay_trace_id = replay_trace_id_context.get()
172172
if replay_trace_id:
173173
clean_span.trace_id = replay_trace_id
174+
# Rust path may have prebuilt bytes with the original OTel trace_id.
175+
# Force re-serialization so CLI receives the replay trace_id.
176+
clean_span.proto_span_bytes = None
174177
else:
175178
logger.error("No replay trace ID found, cannot send inbound span for replay")
176179
return

drift/instrumentation/e2e_common/base_runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ def run_tests(self):
285285
self.log("Phase 3: Running Tusk Tests", Colors.BLUE)
286286
self.log("=" * 50, Colors.BLUE)
287287

288-
env = {"TUSK_ANALYTICS_DISABLED": "1"}
288+
env = {
289+
"TUSK_ANALYTICS_DISABLED": "1",
290+
"TUSK_REQUIRE_INBOUND_REPLAY_SPAN": "1",
291+
}
289292

290293
result = self.run_command(
291294
["tusk", "run", "--print", "--output-format", "json", "--enable-service-logs"],

0 commit comments

Comments
 (0)