Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What port? #63

Open
Daxcor69 opened this issue Feb 10, 2021 · 4 comments
Open

What port? #63

Daxcor69 opened this issue Feb 10, 2021 · 4 comments

Comments

@Daxcor69
Copy link

I am sorry if this is a dumb question, it feels like it. The documentation doesn't say if the metrics are exposed on a different port than the one the app.listen specifies. I have tried to curl that http://127.0.0.1:8080/metrics refuses to connect. I am assuming that once included in my application I can't use the metrics route for my own stuff as it is reserved (unless I change it via the options). So my assumptions are same ip/port as specified in the app.listen directive, just takes over the /metrics route. Just want to make sure this is correct..so I can trouble shoot further.

thanks

@Daxcor69
Copy link
Author

I get this error when I hit the /metrics route.

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Promise
    at ServerResponse.end (_http_outgoing.js:785:13)
    at ServerResponse.end (/mnt/application_code/www/node_modules/express-session/index.js:355:19)
    at ExpressMiddleware.middleware (/mnt/application_code/www/node_modules/prometheus-api-metrics/src/express-middleware.js:99:24)
    at Layer.handle [as handle_request] (/mnt/application_code/www/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/mnt/application_code/www/node_modules/express/lib/router/index.js:317:13)
    at /mnt/application_code/www/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/mnt/application_code/www/node_modules/express/lib/router/index.js:335:12)
    at next (/mnt/application_code/www/node_modules/express/lib/router/index.js:275:10)
    at methodOverride (/mnt/application_code/www/node_modules/method-override/index.js:65:14)
    at Layer.handle [as handle_request] (/mnt/application_code/www/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/mnt/application_code/www/node_modules/express/lib/router/index.js:317:13)
    at /mnt/application_code/www/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/mnt/application_code/www/node_modules/express/lib/router/index.js:335:12)
    at next (/mnt/application_code/www/node_modules/express/lib/router/index.js:275:10)
    at module.exports (/mnt/application_code/www/node_modules/express-ejs-layouts/lib/express-layouts.js:116:3)
    at Layer.handle [as handle_request] (/mnt/application_code/www/node_modules/express/lib/router/layer.js:95:5)

@yorch
Copy link
Contributor

yorch commented Feb 16, 2021

This is due to prom-client v13 having breaking changes that this library hasn't incorporated yet. Created a PR to upgrade it

@Daxcor69
Copy link
Author

What is the status of the breaking changes? Does prom-client now work with your package?

@yorch
Copy link
Contributor

yorch commented Mar 27, 2021

My PR was merged and the package owner released version 3.2.0, so you should be able to use it with prom-client@13.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants