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

Pushgateway call registry async metrics methods #390

Closed
zD98 opened this issue Aug 13, 2020 · 5 comments
Closed

Pushgateway call registry async metrics methods #390

zD98 opened this issue Aug 13, 2020 · 5 comments
Labels

Comments

@zD98
Copy link

zD98 commented Aug 13, 2020

req.write(this.registry.metrics());

metrics is an async method.

So should calling metrics with async/await ?

const metrics = await this.registry.metrics();
req.write(metrics);
@zbjornson
Copy link
Collaborator

Yes, I think you're right. I missed two high-level functions evidently :(. PR welcome, otherwise I'll fix it in the next few days. Thanks for finding that.

@rassokhin-s
Copy link

Hey guys @zD98 @zbjornson. I have just met the same bug. Do you have any plans to merge PR and release a new version?

@neyio
Copy link

neyio commented Jan 4, 2021

This issue still occurs at version 13.Please publish a new sub-version to resolve it, thanks.

@zbjornson
Copy link
Collaborator

This was fixed in #419 (thanks @adorin). Until the new version is published, you can install from github using yarn add siimon/prom-client#83f7867 or npm i siimon/prom-client#83f7867.

@zbjornson
Copy link
Collaborator

v13.1.0 is now published with this fix!

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

Successfully merging a pull request may close this issue.

4 participants