You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all! Awesome work with express-prom-bundle. Was giving it a try this weekend and it seems like the latest release of prom-client (13.0.0) broke the /metrics endpoint. Digging into the issue I found that prom-client@13.0.0 has breaking changes to metrics(). It now returns a promise. https://github.com/siimon/prom-client/releases/tag/v13.0.0. When using curl to test the endpoint it responds with an empty reply.
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise
Relevant stack: at metricsMiddleware (/usr/src/app/node_modules/express-prom-bundle/src/index.js:127:9) at middleware (/usr/src/app/node_modules/express-prom-bundle/src/index.js:137:16)
Thanks for the tips guys. I made a compatibility patch, so the library now supports both 12 and 13 versions of prom-client. I've just published it on npm as version 6.3.1.
As for the future, I hope to rewrite this whole thing in typescript as version 7. At that point I'll simply drop the support for the old library. (testing different version of peer dependency is a pain).
Hi all! Awesome work with
express-prom-bundle
. Was giving it a try this weekend and it seems like the latest release ofprom-client
(13.0.0) broke the/metrics
endpoint. Digging into the issue I found thatprom-client@13.0.0
has breaking changes tometrics()
. It now returns a promise. https://github.com/siimon/prom-client/releases/tag/v13.0.0. When using curl to test the endpoint it responds with an empty reply.package.json
app.js
I believe the issue is in
metricsMiddleware
https://github.com/jochen-schweizer/express-prom-bundle/blob/master/src/index.js#L125-L128. I'm sort of new to bothprom-client
andexpress-prom-bundle
and not quite sure if this is the only spot affected by the change but hope that this helps.The text was updated successfully, but these errors were encountered: