jochen-schweizer / express-prom-bundle

express middleware with standard prometheus metrics in one bundle
MIT License
303 stars 67 forks source link

maxAgeSeconds not part of "opts" type #82

Closed GandalfIX closed 3 years ago

GandalfIX commented 3 years ago

I am in a Typescript project and try to create a promBundle middleware using the maxAgeSeconds config for the "summary". It seems that the maxAgeSeconds is not part of the interface type for express_prom_bundle.Opts. Therefore it is not possible to create with correct types.

const metricsMiddleware = promBundle({
        includeMethod: true,
        includePath: true,
        autoregister: false,
        metricType: 'summary',
        maxAgeSeconds: 600  // <-- Typing error
    });
disjunction commented 3 years ago

fixed in version 6.3.6. Please update form npm and give it a try. Thanks for reporting.