From 637133055bae0dd6bd2f48c3cbc704a5cfb1d888 Mon Sep 17 00:00:00 2001 From: Dominik Sigmund <dominik.sigmund@br.de> Date: Mon, 4 May 2020 15:20:21 +0200 Subject: [PATCH] Bug fix default metrics --- src/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index b40948f..117c175 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,7 +52,7 @@ export class Metrics { this._disableDefaultMetrics = false } if (!this._disableDefaultMetrics) { - this._client._collectDefaultMetrics = this._client.collectDefaultMetrics + this._client.collectDefaultMetrics() } if (!this._disableErrorCounter) { this._numOfErrors = new this._client.Counter({ @@ -102,9 +102,6 @@ export class Metrics { } public endpoint = (req: express.Request, res: express.Response): void => { - if (!this._disableDefaultMetrics) { - this._client._collectDefaultMetrics() - } res.set('Content-Type', this._client.register.contentType) res.status(200) res.end(this._client.register.metrics()) -- GitLab