Hi
I am attaching metrics programatically in TypeScript. This used to work fine with a previous version (5.0.2) but with recent updates I now have a TypeScript error:
error TS2339: Property 'metricsMiddleware' does not exist on type 'RequestHandler'.
Here is how I used to do it in 5.0.2:
import expressPromBundle from "express-prom-bundle";
const PROMETHEUS_BUNDLE = expressPromBundle({...})
[...]
expressApp.route("/metrics").get(function (req, res) {
PROMETHEUS_BUNDLE.metricsMiddleware(req, res);
});
Here is how I try to do it now (with the error TS2339):
expressApp.use("/metrics", PROMETHEUS_BUNDLE_METRICS_MIDDLEWARE.metricsMiddleware);
This is only a typing issue and does not prevent my server from running correctly.
Hi
I am attaching metrics programatically in TypeScript. This used to work fine with a previous version (5.0.2) but with recent updates I now have a TypeScript error:
error TS2339: Property 'metricsMiddleware' does not exist on type 'RequestHandler'.Here is how I used to do it in 5.0.2:
Here is how I try to do it now (with the error TS2339):
This is only a typing issue and does not prevent my server from running correctly.