comparison mod_prometheus/mod_prometheus.lua @ 4596:c406e4bf7ee5

mod_prometheus: Revert part of previous commit Accidentally added one too many of these asserts when adding to every module that used get_stats. This one does work with openmetrics already!
author Kim Alvefur <zash@zash.se>
date Sun, 20 Jun 2021 13:54:23 +0200
parents bac3dae031ee
children
comparison
equal deleted inserted replaced
4595:bac3dae031ee 4596:c406e4bf7ee5
14 local socket = require "socket"; 14 local socket = require "socket";
15 local statsman = require "core.statsmanager"; 15 local statsman = require "core.statsmanager";
16 local get_stats = statsman.get_stats; 16 local get_stats = statsman.get_stats;
17 local get_metric_registry = statsman.get_metric_registry; 17 local get_metric_registry = statsman.get_metric_registry;
18 local collect = statsman.collect; 18 local collect = statsman.collect;
19
20 assert(get_stats, "not compatible with trunk based on openmetrics");
21 19
22 local function escape(text) 20 local function escape(text)
23 return text:gsub("\\", "\\\\"):gsub("\"", "\\\""):gsub("\n", "\\n"); 21 return text:gsub("\\", "\\\\"):gsub("\"", "\\\""):gsub("\n", "\\n");
24 end 22 end
25 23