First, thx for your great work.
The last 3 hours i was looking for a problem. My pushgateway instance seems to have no connection to the registry.
Since the TS Compiler does not show an error, i've not checked to code ...
let push = new Pushgateway('http://127.0.0.1:9091', reg);
This code is TS correct, but wrong.
Reason:
The Typedefintion
|
constructor(url: string, options?: any, registry?: Registry<T>); |
options is typed as any and registry as optional.
So it is correct to forget the option parameter, so the registry parameter ist used as "option"
Which does not make any sence. I created a Pushgateways without a connected registry ...
Solution:
If i look into the source code the type is Url from packege "url" extended with a single property requireJobName: true, ?
So a better type for option is {requireJobName: boolean}.
First, thx for your great work.
The last 3 hours i was looking for a problem. My pushgateway instance seems to have no connection to the registry.
Since the TS Compiler does not show an error, i've not checked to code ...
This code is TS correct, but wrong.
Reason:
The Typedefintion
prom-client/index.d.ts
Line 700 in c1d76c5
optionsis typed as any andregistryas optional.So it is correct to forget the
optionparameter, so the registry parameter ist used as "option"Which does not make any sence. I created a Pushgateways without a connected registry ...
Solution:
If i look into the source code the type is
Urlfrom packege "url" extended with a single propertyrequireJobName: true,?So a better type for option is
{requireJobName: boolean}.