diff --git a/drift/core/tracing/td_span_processor.py b/drift/core/tracing/td_span_processor.py index f2e95b8..ef1e6e7 100644 --- a/drift/core/tracing/td_span_processor.py +++ b/drift/core/tracing/td_span_processor.py @@ -171,6 +171,9 @@ def on_end(self, span: ReadableSpan) -> None: replay_trace_id = replay_trace_id_context.get() if replay_trace_id: clean_span.trace_id = replay_trace_id + # Rust path may have prebuilt bytes with the original OTel trace_id. + # Force re-serialization so CLI receives the replay trace_id. + clean_span.proto_span_bytes = None else: logger.error("No replay trace ID found, cannot send inbound span for replay") return diff --git a/drift/instrumentation/e2e_common/base_runner.py b/drift/instrumentation/e2e_common/base_runner.py index ee862ff..d13974f 100644 --- a/drift/instrumentation/e2e_common/base_runner.py +++ b/drift/instrumentation/e2e_common/base_runner.py @@ -285,7 +285,10 @@ def run_tests(self): self.log("Phase 3: Running Tusk Tests", Colors.BLUE) self.log("=" * 50, Colors.BLUE) - env = {"TUSK_ANALYTICS_DISABLED": "1"} + env = { + "TUSK_ANALYTICS_DISABLED": "1", + "TUSK_REQUIRE_INBOUND_REPLAY_SPAN": "1", + } result = self.run_command( ["tusk", "run", "--print", "--output-format", "json", "--enable-service-logs"],