Skip to content

Commit ca82443

Browse files
committed
Prometheus fix - creating a new registry to collect default metrics for nodejs
Signed-off-by: Aayush Chouhan <achouhan@redhat.com>
1 parent 6d5783b commit ca82443

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/analytic_services/prometheus_reports/nodejs_report.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class NodeJsReport extends BasePrometheusReport {
1212
constructor() {
1313
super();
1414

15+
// creating new instance of registry to collect default metrics for nodejs
16+
this._register = new this.prom_client.Registry();
17+
1518
if (this.enabled) {
1619
this.prom_client.collectDefaultMetrics({
1720
register: this.register,

0 commit comments

Comments
 (0)