diff --git a/modules/http/README.rst b/modules/http/README.rst
index 4798010a183bcc6a3bb2ab4fd938aa511c083bdd..806e07f197fb66cab11667470c5d3c8335d9c070 100644
--- a/modules/http/README.rst
+++ b/modules/http/README.rst
@@ -120,6 +120,19 @@ You can namespace the metrics in configuration, using `http.prometheus.namespace
 	-- Set Prometheus namespace
 	http.prometheus.namespace = 'resolver_'
 
+You can also add custom metrics or rewrite existing metrics before they are returned to Prometheus client.
+
+.. code-block:: lua
+
+	http = {
+		host = 'localhost',
+	}
+
+	-- Add an arbitrary metric to Prometheus
+	http.prometheus.finalize = function (metrics)
+		table.insert(metrics, 'build_info{version="1.2.3"} 1')
+	end
+
 Tracing requests
 ^^^^^^^^^^^^^^^^
 
diff --git a/modules/http/prometheus.lua b/modules/http/prometheus.lua
index 898590efbd18828458ea7bcd84c7b4f33566166c..cf76ef4cf572795fdd25a3adc2bf15d5c7274fdb 100644
--- a/modules/http/prometheus.lua
+++ b/modules/http/prometheus.lua
@@ -1,6 +1,7 @@
 -- Module implementation
 local M = {
 	namespace = '',
+	finalize = function (_ --[[metrics]]) end,
 }
 
 local snapshots, snapshots_count = {}, 120
@@ -150,6 +151,10 @@ local function serve_prometheus()
 	end
 	table.insert(render, string.format('%slatency_count %f', M.namespace, count))
 	table.insert(render, string.format('%slatency_sum %f', M.namespace, sum))
+	-- Finalize metrics table before rendering
+	if type(M.finalize) == 'function' then
+		M.finalize(render)
+	end
 	return table.concat(render, '\n') .. '\n'
 end