]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
docs(dnsdist): Add missing OT tracing functions
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 8 Oct 2025 12:42:49 +0000 (14:42 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 14 Oct 2025 18:34:58 +0000 (20:34 +0200)
pdns/dnsdistdist/docs/reference/actions.rst
pdns/dnsdistdist/docs/reference/config.rst
pdns/dnsdistdist/docs/reference/ottrace.rst

index 8d5850fdbc912174b99156efc3d8c5cafca30ae2..fbc50a91149a8272e4b7960fb12f6d918a51aef4 100644 (file)
@@ -776,6 +776,17 @@ The following actions exist.
 
   :param int ttl: Cache TTL for temporary failure replies
 
+.. function:: SetTraceAction(value)
+
+  .. versionadded:: 2.1.0
+
+  Enable or disable :doc:`OpenTelemetry tracing <../reference/ottrace>` for this query. Don't forget to use :func:`RemoteLogResponseAction` to actually send the Protobuf with the trace to a collector.
+  Subsequent rules are processed after this action.
+
+  Tracing has to be turned on globally as well using :func:`setOpenTelemetryTracing`.
+
+  :param bool value: Whether to enable or disable query tracing.
+
 .. function:: SkipCacheAction()
 
   .. deprecated:: 1.6.0
index 4bfb998c9359549214797e33cf796e4b24d963c6..1c96a7da6a43c4a025d9c6e19d259c05ed04e947 100644 (file)
@@ -1414,6 +1414,14 @@ Status, Statistics and More
   * ``levelPrefix=prefix``: string - Set the prefix for the log level. Default is ``prio``.
   * ``timeFormat=format``: string - Set the time format. Supported values are ``ISO8601`` and ``numeric``. Default is ``numeric``.
 
+.. function:: setOpenTelemetryTracing(value)
+
+  .. versionadded:: 2.1.0
+
+  Enable or disable collection of OpenTelemetry trace data. This will allow the use of :func:`SetTraceAction` to trace queries. This can be called at runtime.
+
+  :param bool enable: true to enable, false to disable.
+
 .. function:: setVerbose(verbose)
 
   .. versionadded:: 1.8.0
index 71feeb974c9ee1c7ae8903d38dfe4e0c9739ae95..472874519329cb73053ad098f41b923eb16ba760 100644 (file)
@@ -7,11 +7,11 @@ OpenTelemetry Tracing
 
 Since version 2.1.0, when :program:`dnsdist` is built with ProtoBuf support, sent messages (using e.g. :func:`RemoteLogResponseAction`) can contain `OpenTelemetry traces <https://opentelemetry.io/docs/concepts/signals/traces>`__ data.
 
-To enable tracing, use :func:`setOpenTelemetryTracing(true) <setOpenTelemetryTracing>` in your configuration, or ``logging.open_telemetry_tracing`` to ``true`` in your YAML configuration.
+To enable tracing, use :func:`setOpenTelemetryTracing(true) <setOpenTelemetryTracing>` in your configuration, or ``logging.open_telemetry_tracing`` to ``true`` in your:ref:`YAML Logging Configuration <yaml-settings-LoggingConfiguration>`.
 It is also possible to call :func:`setOpenTelemetryTracing` at runtime.
 Once enabled, Rules can be used to turn on tracing on a per-query basis.
 
-Per-query tracing can be enabled using the :func:`SetTraceAction` or :func:`SetTraceResponseAction`. However :program:`dnsdist` captures some data before rules processing in order to have tracing information from before the rules are evaluated.
+Per-query tracing can be enabled using the :func:`SetTraceAction`. However, :program:`dnsdist` captures some data before rules processing in order to have tracing information from before the rules are evaluated.
 When tracing is enabled in the query, :program:`dnsdist` stores start and end times of certain (but not all) functions that are called during the lifetime of the query and the response.
 It is recommended to send the traces out through a RemoteLogger in ResponseRules, to capture as much information as possible.