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 #634

Signed-off-by: Jagpreet Singh Sasan <jagpreet.singh.sasan@accenture.com>
  • Loading branch information
jagpreetsinghsasan authored and kikoncuo committed Mar 11, 2021
1 parent 89c0060 commit 6bb0cf9
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 6bb0cf9

Please sign in to comment.