Compare commits

...

1 Commits

Author SHA1 Message Date
Naren c0954d948c collectDefaultMetrics fn 2023-03-14 12:41:48 -07:00
1 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,5 @@
import promClient from 'prom-client'; import promClient from 'prom-client';
// 'timeout' property is not needed/supported
// https://github.com/siimon/prom-client/blob/199b7d19f8c8c34ee8653264e8dc0e57b420074f/CHANGELOG.md#1200---2020-02-20
promClient.collectDefaultMetrics();
export default class ZenkoMetrics { export default class ZenkoMetrics {
static createCounter(params: promClient.CounterConfiguration<string>) { static createCounter(params: promClient.CounterConfiguration<string>) {
return new promClient.Counter(params); return new promClient.Counter(params);
@ -32,4 +28,8 @@ export default class ZenkoMetrics {
static asPrometheusContentType() { static asPrometheusContentType() {
return promClient.register.contentType; return promClient.register.contentType;
} }
static collectDefaultMetrics() {
return promClient.collectDefaultMetrics();
}
} }