{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9503","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9503/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9503/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9503/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/9503","id":291581532,"number":9503,"title":"DeprecationWarning: prom-client ... when starting Rocket Chat server","user":{"login":"distlibs","id":30928251,"avatar_url":"https://avatars3.githubusercontent.com/u/30928251?v=4","gravatar_id":"","url":"https://api.github.com/users/distlibs","html_url":"https://github.com/distlibs","followers_url":"https://api.github.com/users/distlibs/followers","following_url":"https://api.github.com/users/distlibs/following{/other_user}","gists_url":"https://api.github.com/users/distlibs/gists{/gist_id}","starred_url":"https://api.github.com/users/distlibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distlibs/subscriptions","organizations_url":"https://api.github.com/users/distlibs/orgs","repos_url":"https://api.github.com/users/distlibs/repos","events_url":"https://api.github.com/users/distlibs/events{/privacy}","received_events_url":"https://api.github.com/users/distlibs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-25T14:07:13Z","updated_at":"2018-02-16T17:11:59Z","closed_at":null,"author_association":"NONE","body":"### Description:\r\n\r\nWhen I start Rocket Chat server using command `meteor` I get deprecation warning:\r\n`(STDERR) (node:8753) DeprecationWarning: prom-client - Passing a non-object to metrics constructor is deprecated` \r\n\r\nI think it can be related with:\r\n`RocketChat.metrics.messagesSent = new client.Counter('messages_sent', 'cumulated number of messages sent');`\r\nin  `packages/rocketchat-lib/server/lib/metrics.js`. \r\n\r\nIf I change to this:\r\n`RocketChat.metrics.messagesSent = new client.Counter({'name': 'message_sent', 'help': 'cumulated number of messages sent'});`\r\ndeprecation gone.\r\n\r\n### Server Setup Information:\r\n\r\n* Version of Rocket.Chat Server: 0.61.0-develop (fbbe16c155)\r\n* Operating System:  Ubuntu 16.04.3 64-bit\r\n* Deployment Method(snap/docker/tar/etc): git pull\r\n* Number of Running Instances: 1\r\n* DB Replicaset Oplog: Enabled\r\n* Node Version: 8.9.3 - x64"},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/366298005","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/9503#issuecomment-366298005","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9503","id":366298005,"user":{"login":"jgtoriginal","id":1785392,"avatar_url":"https://avatars3.githubusercontent.com/u/1785392?v=4","gravatar_id":"","url":"https://api.github.com/users/jgtoriginal","html_url":"https://github.com/jgtoriginal","followers_url":"https://api.github.com/users/jgtoriginal/followers","following_url":"https://api.github.com/users/jgtoriginal/following{/other_user}","gists_url":"https://api.github.com/users/jgtoriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/jgtoriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgtoriginal/subscriptions","organizations_url":"https://api.github.com/users/jgtoriginal/orgs","repos_url":"https://api.github.com/users/jgtoriginal/repos","events_url":"https://api.github.com/users/jgtoriginal/events{/privacy}","received_events_url":"https://api.github.com/users/jgtoriginal/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T17:11:59Z","updated_at":"2018-02-16T17:11:59Z","author_association":"CONTRIBUTOR","body":"@geekgonecrazy I tested this solution and can confirm that it works. So just opened a PR as you suggested."}}
{"actor":{"display_login":"jgtoriginal"}}