{"nativeError":{},"name":"Error","message":"A metric with the name trace_calls has already been registered.","stack":[{"fullFilePath":"/node_modules/prom-client/lib/registry.js:67:10","fileName":"registry.js","fileNameWithLine":"registry.js:67","fileColumn":"10","fileLine":"67","filePath":"node_modules/prom-client/lib/registry.js","filePathWithLine":"node_modules/prom-client/lib/registry.js:67","method":"Registry.registerMetric"},{"fullFilePath":"/node_modules/prom-client/lib/metric.js:48:13","fileName":"metric.js","fileNameWithLine":"metric.js:48","fileColumn":"13","fileLine":"48","filePath":"node_modules/prom-client/lib/metric.js","filePathWithLine":"node_modules/prom-client/lib/metric.js:48","method":"new Metric"},
Perhaps might need to check if the gauge/counter exists before registering a 2nd time.
if ( !prometheus.registry.getSingleMetric(name) ) {
prometheus.registerGauge(name, "custom help", Object.keys(labels));
}
Receiving the following error
Perhaps might need to check if the gauge/counter exists before registering a 2nd time.