{"action":"created","issue":{"url":"https://api.github.com/repos/finagle/finch/issues/960","repository_url":"https://api.github.com/repos/finagle/finch","labels_url":"https://api.github.com/repos/finagle/finch/issues/960/labels{/name}","comments_url":"https://api.github.com/repos/finagle/finch/issues/960/comments","events_url":"https://api.github.com/repos/finagle/finch/issues/960/events","html_url":"https://github.com/finagle/finch/pull/960","id":340478455,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwODgwMjYw","number":960,"title":"Capture Traces","user":{"login":"vkostyukov","id":1098539,"node_id":"MDQ6VXNlcjEwOTg1Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1098539?v=4","gravatar_id":"","url":"https://api.github.com/users/vkostyukov","html_url":"https://github.com/vkostyukov","followers_url":"https://api.github.com/users/vkostyukov/followers","following_url":"https://api.github.com/users/vkostyukov/following{/other_user}","gists_url":"https://api.github.com/users/vkostyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkostyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkostyukov/subscriptions","organizations_url":"https://api.github.com/users/vkostyukov/orgs","repos_url":"https://api.github.com/users/vkostyukov/repos","events_url":"https://api.github.com/users/vkostyukov/events{/privacy}","received_events_url":"https://api.github.com/users/vkostyukov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-12T03:40:46Z","updated_at":"2018-07-12T15:36:07Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/finagle/finch/pulls/960","html_url":"https://github.com/finagle/finch/pull/960","diff_url":"https://github.com/finagle/finch/pull/960.diff","patch_url":"https://github.com/finagle/finch/pull/960.patch"},"body":"As discussed in #959. Here is how it works (from the user perspective).\r\n\r\n```scala\r\nscala> import io.finch._, io.finch.syntax._\r\nimport io.finch._\r\nimport io.finch.syntax._\r\n\r\nscala> val foo = get(\"foo\" :: path[String]) { s: String => Ok(s) }\r\nfoo: io.finch.Endpoint[String] = GET /foo :: :string\r\n\r\nscala> import com.twitter.finagle.http.Request\r\nimport com.twitter.finagle.http.Request\r\n\r\nscala> val s = foo.toServiceAs[Text.Plain]\r\ns: com.twitter.finagle.Service[com.twitter.finagle.http.Request,com.twitter.finagle.http.Response] = io.finch.ToService$$anon$4$$anon$2\r\n\r\nscala> Trace.capture { s(Request(\"/foo/bar\")).map(_ => Trace.captured) }\r\nres0: com.twitter.util.Future[io.finch.Trace] = Promise@406161512(state=Done(Return(/foo/:string)))\r\n```"},"comment":{"url":"https://api.github.com/repos/finagle/finch/issues/comments/404554943","html_url":"https://github.com/finagle/finch/pull/960#issuecomment-404554943","issue_url":"https://api.github.com/repos/finagle/finch/issues/960","id":404554943,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDU1NDk0Mw==","user":{"login":"sergeykolbasov","id":2317121,"node_id":"MDQ6VXNlcjIzMTcxMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/2317121?v=4","gravatar_id":"","url":"https://api.github.com/users/sergeykolbasov","html_url":"https://github.com/sergeykolbasov","followers_url":"https://api.github.com/users/sergeykolbasov/followers","following_url":"https://api.github.com/users/sergeykolbasov/following{/other_user}","gists_url":"https://api.github.com/users/sergeykolbasov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeykolbasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeykolbasov/subscriptions","organizations_url":"https://api.github.com/users/sergeykolbasov/orgs","repos_url":"https://api.github.com/users/sergeykolbasov/repos","events_url":"https://api.github.com/users/sergeykolbasov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeykolbasov/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T15:36:07Z","updated_at":"2018-07-12T15:36:07Z","author_association":"MEMBER","body":"@vkostyukov ok, that's nice. Have no questions"}}
{"actor":{"display_login":"sergeykolbasov"}}