{"action":"opened","issue":{"url":"https://api.github.com/repos/linkerd/linkerd/issues/1963","repository_url":"https://api.github.com/repos/linkerd/linkerd","labels_url":"https://api.github.com/repos/linkerd/linkerd/issues/1963/labels{/name}","comments_url":"https://api.github.com/repos/linkerd/linkerd/issues/1963/comments","events_url":"https://api.github.com/repos/linkerd/linkerd/issues/1963/events","html_url":"https://github.com/linkerd/linkerd/issues/1963","id":326760677,"number":1963,"title":"Enable plugins to emit stat into L5D stat trees for Identifier ","user":{"login":"leozc","id":1513416,"avatar_url":"https://avatars1.githubusercontent.com/u/1513416?v=4","gravatar_id":"","url":"https://api.github.com/users/leozc","html_url":"https://github.com/leozc","followers_url":"https://api.github.com/users/leozc/followers","following_url":"https://api.github.com/users/leozc/following{/other_user}","gists_url":"https://api.github.com/users/leozc/gists{/gist_id}","starred_url":"https://api.github.com/users/leozc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leozc/subscriptions","organizations_url":"https://api.github.com/users/leozc/orgs","repos_url":"https://api.github.com/users/leozc/repos","events_url":"https://api.github.com/users/leozc/events{/privacy}","received_events_url":"https://api.github.com/users/leozc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-26T19:06:24Z","updated_at":"2018-05-26T19:06:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Issue Type:\r\n\r\n- [ ] Bug report\r\n- [ X] Feature request\r\n\r\nThis is alternative code path for feature request #1922 - #1922  is done for Announcer and this bug is to track Identifier\r\n\r\nWe are writing multiple plugins for our L5D mesh, there are needs to initialize a finagle client to perform RPC, however there is no way to submit the stat into L5D metrics system.\r\n\r\nSuggestion: Is it possible to enable this user scenario?\r\n\r\n\r\n``` \r\ndef getClient(withRequestTimeoutMS: Int =  1000 , addr: InetSocketAddress, path:Path): Service[http.Request, http.Response]  = {\r\n    val monitor: Monitor = new Monitor {\r\n      def handle(t: Throwable): Boolean = {\r\n        logger.error(t, t.getMessage, t.getStackTrace)\r\n        true\r\n      }\r\n    }\r\n    val metrics = MetricsTree() // possible to get the metrics tree from global \r\n    val stats = new MetricsTreeStatsReceiver(metrics) // register this stat object to be collected?\r\n    Http.client\r\n      .withStatsReceiver(stats)\r\n      .withHttpStats\r\n      .withRequestTimeout(Duration.fromMilliseconds(withRequestTimeoutMS))\r\n      .withMonitor(monitor)\r\n      .newService(s\"${addr.getHostName()}:${addr.getPort()}\", \"hc_client\")\r\n\r\n  }\r\n```"}}
{"actor":{"display_login":"leozc"}}