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

DeprecationWarning: prom-client ... when starting Rocket Chat server #9503

Closed
distlibs opened this issue Jan 25, 2018 · 2 comments · Fixed by #9747
Closed

DeprecationWarning: prom-client ... when starting Rocket Chat server #9503

distlibs opened this issue Jan 25, 2018 · 2 comments · Fixed by #9747
Milestone

Comments

@distlibs
Copy link

distlibs commented Jan 25, 2018

Description:

When I start Rocket Chat server using command meteor I get deprecation warning:
(STDERR) (node:8753) DeprecationWarning: prom-client - Passing a non-object to metrics constructor is deprecated

I think it can be related with:
RocketChat.metrics.messagesSent = new client.Counter('messages_sent', 'cumulated number of messages sent');
in packages/rocketchat-lib/server/lib/metrics.js.

If I change to this:
RocketChat.metrics.messagesSent = new client.Counter({'name': 'message_sent', 'help': 'cumulated number of messages sent'});
deprecation gone.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.61.0-develop (fbbe16c)
  • Operating System: Ubuntu 16.04.3 64-bit
  • Deployment Method(snap/docker/tar/etc): git pull
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • Node Version: 8.9.3 - x64
@geekgonecrazy
Copy link
Contributor

Could you please open a PR with this change? Seems like your changes should fix it for everyone.

@jgtoriginal
Copy link
Contributor

jgtoriginal commented Feb 16, 2018

@geekgonecrazy I tested this solution and can confirm that it works. So just opened a PR as you suggested.
Thanks @distlibs for your collaboration.

@rodrigok rodrigok added this to the 0.62.0 milestone Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants