Skip to content

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

@distlibs

Description

@distlibs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions