]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Typo's from miod's review
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 23 Oct 2025 13:20:57 +0000 (15:20 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 10 Nov 2025 14:29:29 +0000 (15:29 +0100)
Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/protozero-trace.cc
pdns/protozero-trace.hh
pdns/recursordist/docs/performance.rst
pdns/recursordist/pdns_recursor.cc
pdns/recursordist/rec-tcp.cc

index 4a5ed0e7a200f37612a04836e30d388de476af5d..e28a4bef0496729529278682f612a954e0c229d4 100644 (file)
@@ -553,11 +553,11 @@ KeyValue KeyValue::decode(protozero::pbf_reader& reader)
   return value;
 }
 
-bool extractOTraceIDs(const EDNSOptionViewMap& map, pdns::trace::InitialSpanInfo& span)
+bool extractOTraceIDs(const EDNSOptionViewMap& map, EDNSOptionCode::EDNSOptionCodeEnum eoc, pdns::trace::InitialSpanInfo& span)
 {
   // traceid gets set from edns options (if available and well-formed)
   // parent_span_id gets set from edns options (if available and well-formed)
-  auto traceidset = extractOTraceIDs(map, EDNSOptionCode::OTTRACEIDS, span.trace_id, span.parent_span_id);
+  auto traceidset = extractOTraceIDs(map, eoc, span.trace_id, span.parent_span_id);
   return traceidset;
 }
 
@@ -570,7 +570,7 @@ bool extractOTraceIDs(const EDNSOptionViewMap& map, pdns::trace::InitialSpanInfo
  * @param spanID will be set to the SpanID in the EDNS options, untouched otherwise
  * @return true if a traceid was found in the EDNS options
  */
-bool extractOTraceIDs(const EDNSOptionViewMap& map, const EDNSOptionCode::EDNSOptionCodeEnum& eoc, pdns::trace::TraceID& traceID, pdns::trace::SpanID& spanID)
+bool extractOTraceIDs(const EDNSOptionViewMap& map, EDNSOptionCode::EDNSOptionCodeEnum eoc, pdns::trace::TraceID& traceID, pdns::trace::SpanID& spanID)
 {
   EDNSOptionCode::EDNSOptionCodeEnum realEOC = eoc;
   if (realEOC == 0) {
index 4477a9f9fe923b2bf4d021da1982b181b5d69f56..dec37eeff6e5bbeae632dac0dcf25ea1921c59bf 100644 (file)
@@ -828,7 +828,7 @@ private:
   const size_t size;
 };
 
-bool extractOTraceIDs(const EDNSOptionViewMap& map, pdns::trace::InitialSpanInfo& span);
-bool extractOTraceIDs(const EDNSOptionViewMap& map, const EDNSOptionCode::EDNSOptionCodeEnum& eoc, pdns::trace::TraceID& traceID, pdns::trace::SpanID& spanID);
+bool extractOTraceIDs(const EDNSOptionViewMap& map, EDNSOptionCode::EDNSOptionCodeEnum eoc, pdns::trace::InitialSpanInfo& span);
+bool extractOTraceIDs(const EDNSOptionViewMap& map, EDNSOptionCode::EDNSOptionCodeEnum eoc, pdns::trace::TraceID& traceID, pdns::trace::SpanID& spanID);
 
 } // namespace pdns::trace
index e92d2e0cf88ccf1d5896621d258a727724c05dbd..963f6b4e0cd6bcc7083fe8b6b17d076637bc9091 100644 (file)
@@ -428,17 +428,17 @@ If the proxy protocol is used, the source specified by the proxy protocol header
 If Table Based Proxy Mapping is active, the mapped address is used.
 
 If a matching condition is found, the corresponding subconditions are evaluated.
-If all mentioned subconditions are satisfied, the condittion evalutes to ``true`` and OpenTelemetry Trace data is generated.
+If all mentioned subconditions are satisfied, the condition evaluates to ``true`` and OpenTelemetry Trace data is generated.
 If a subcondition is absent, it is not relevant.
-The following subcondtions can be specified:
+The following subconditions can be specified:
 
 - ``qnames``: a suffixmatch with the incoming qname is done against the suffixes specified in ``qnames``.
 - ``qtypes``: the qtype of the incoming query must be listed in ``qtypes``
 - ``qid``: the query id of the incoming query must match ``qid``.
-- ``edns_option_required``: the incoing query must have an EDSN option specifying the TraceID.
-- ``traceid_only`` if ``true`` only the TraceID is picked up from EDNS data (if present) and placed into the protobuf `openTelemetryTraceID` field; no detailed `openTelemetryData` is produced.
+- ``edns_option_required``: the incoming query must have an EDSN option specifying the TraceID.
+- ``traceid_only``: if ``true`` only the TraceID is picked up from EDNS data (if present) and placed into the protobuf `openTelemetryTraceID` field; no detailed `openTelemetryData` is produced.
 
-In the following example two conditions are specified:
+In the following example, two conditions are specified:
 
 .. code-block:: yaml
 
@@ -461,7 +461,7 @@ Queries coming from an IP not matching any of the mentioned subnets will not gen
 Note that only the source IP is used to select a condition to evaluate.
 It is undefined what happens if a subnet occurs multiple times in all :ref:`setting-yaml-logging.opentelemetry_trace_conditions`.
 
-To generate OpenTelemetry Trace information for all queries (the 5.3.x behaviour), the follwing condition can be used:
+To generate OpenTelemetry Trace information for all queries (matching the 5.3.x behaviour), the follwing condition can be used:
 
 .. code-block:: yaml
 
@@ -485,9 +485,9 @@ To include a TraceID in a query ``sdig`` can be used, or a modern ``dig``, speci
 
    dig +ednsopt=65500:00000102030405060708090a0b0c0d0e0fff ...
 
-The first 4 zeroes after the colon specify the version byte and a reserved byte, followed by a 16 byte (32 hex characters) TraceID.
+The first 4 zeroes after the colon specify the version byte and a reserved byte, followed by a 16 bytes (32 hex characters) TraceID.
 Note that the EDNS option number 65500 is subject to change in the future.
-To also add a parent SpanID to the EDNS value, append 8 bytes (16 hex characters) more.
+To also add a parent SpanID to the EDNS value, append 8 more bytes (16 hex characters.)
 
 Example OpenTelemetry Trace in in JSON representation
 """""""""""""""""""""""""""""""""""""""""""""""""""""
index d13d6b0e5a393ec02583923abe199afa03975b60..fb78da262fd00cd9d4cc70206023637ad265e408 100644 (file)
@@ -2293,7 +2293,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr
         ecsParsed = true;
 
         if (SyncRes::eventTraceEnabled(SyncRes::event_trace_to_ot)) {
-          bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, otTrace);
+          bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::OTTRACEIDS, otTrace);
           if (!matchOTConditions(eventTrace, t_OTConditions, mappedSource, qname, qtype, ntohs(headerdata->id), ednsFound) && SyncRes::eventTraceEnabledOnly(SyncRes::event_trace_to_ot)) {
             eventTrace.setEnabled(false);
           }
index 0e15000a972d3ff7d634e57a60d37ac4ff7ccfaa..fdaf64849085b7149a9227734d4d796523d2cda3 100644 (file)
@@ -340,7 +340,7 @@ static void doProcessTCPQuestion(std::unique_ptr<DNSComboWriter>& comboWriter, s
       qnameParsed = true;
 
       if (SyncRes::eventTraceEnabled(SyncRes::event_trace_to_ot)) {
-        bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, comboWriter->d_otTrace);
+        bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::OTTRACEIDS, comboWriter->d_otTrace);
         if (SyncRes::eventTraceEnabledOnly(SyncRes::event_trace_to_ot) && !matchOTConditions(comboWriter->d_eventTrace, t_OTConditions, comboWriter->d_mappedSource, qname, qtype, ntohs(comboWriter->d_mdp.d_header.id), ednsFound)) {
           comboWriter->d_eventTrace.setEnabled(false);
         }