]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update documentation with getMetric's signature overload
authorJess Bees <jesse@toomanybees.com>
Thu, 6 Nov 2025 21:20:54 +0000 (16:20 -0500)
committerJess Bees <jesse@toomanybees.com>
Mon, 17 Nov 2025 19:35:55 +0000 (14:35 -0500)
Signed-off-by: Jess Bees <jesse@toomanybees.com>
pdns/recursordist/docs/lua-scripting/statistics.rst

index dd16878b513464ad2a438f02ef56885295be5e76..ee00ec5dd9375ee348ec53a84f1108afb78b7509 100644 (file)
@@ -15,6 +15,7 @@ Create a custom metric with:
   myMetric = getMetric("myspecialmetric")
 
 .. function:: getMetric(name [, prometheusName]) -> Metric
+              getMetric(name [, prometheusTable]) -> Metric
 
   Returns the :class:`Metric` object with the name ``name``, creating the metric if it does not exist.
 
@@ -24,20 +25,11 @@ Create a custom metric with:
 
   :param string prometheusName: The optional Prometheus specific name.
 
-.. versionadded:: 5.4.0
+  .. versionAdded:: 5.4.0
 
-.. function:: initMetric(name [, prometheusName]) -> Metric
-              initMetric(name [, prometheusTable]) -> Metric
-
-  :param string name: The metric to create
-  :param string prometheusName: The optional Prometheus specific name
   :param table prometheusTable: The optional table of Prometheus specific options
 
-  Creates a new :class:`Metric` object with the name ``name`` and initializes it with optional Prometheus specific details.
-  Calling this function with a string is identical to calling :func:`getMetric`.
-  Calling this function with a table allows passing the desired Prometheus name, type, and description.
-
-  The elements of the table can be:
+  The elements of ``prometheusTable`` can be:
 
   .. csv-table::
     :delim: space