Skip to content

Commit

Permalink
fix(fabric): issue with multiple objects of prometheus metrics
Browse files Browse the repository at this point in the history
	Primary Change
	--------------

	1. Adding the default_metrics to the registry object which will differ for different objects.

	Fixes hyperledger-cacti#634

Signed-off-by: Jagpreet Singh Sasan <[email protected]>
  • Loading branch information
jagpreetsinghsasan authored and Jordi Giron committed Apr 8, 2021
1 parent 0d48247 commit 02e76a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export class PrometheusExporter {
}

public startMetricsCollection(): void {
promClient.collectDefaultMetrics();
const Registry = promClient.Registry;
const register = new Registry();
promClient.collectDefaultMetrics({ register });
}
}

0 comments on commit 02e76a7

Please sign in to comment.