]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: add back parent span attributes, they were lost in #15756 15981/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 18 Aug 2025 10:51:56 +0000 (12:51 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 18 Aug 2025 10:52:43 +0000 (12:52 +0200)
Fixes #15974

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/rec-eventtrace.cc

index aeb2d480784d95a63adbb8d65fb6d570fd13f58d..8b1be8f529a7dae97b06475b4ce61208ac0c70ae 100644 (file)
@@ -79,7 +79,14 @@ std::vector<pdns::trace::Span> RecEventTrace::convertToOT(const InitialSpanInfo&
   ret.reserve((d_events.size() / 2) + 1);
 
   // The parent of all Spans
-  ret.emplace_back(Span{.trace_id = span.trace_id, .span_id = span.span_id, .parent_span_id = span.parent_span_id, .end_time_unix_nano = timestamp()});
+  ret.emplace_back(Span{
+    .trace_id = span.trace_id,
+    .span_id = span.span_id,
+    .parent_span_id = span.parent_span_id,
+    .name = "RecRequest",
+    .start_time_unix_nano = span.start_time_unix_nano,
+    .end_time_unix_nano = timestamp(),
+  });
 
   std::vector<SpanID> spanIDs; // mapping of span index in ret vector to SpanID
   std::map<size_t, size_t> ids; // mapping from event record index to index in ret vector (Spans)