{"action":"created","comment":{"url":"https://api.github.com/repos/openzipkin/brave/pulls/comments/80822525","pull_request_review_id":1850281,"id":80822525,"diff_hunk":"@@ -8,50 +8,54 @@\n import com.twitter.zipkin.gen.Endpoint;\n import zipkin.TraceKeys;\n \n-import java.net.URI;\n-import java.util.Arrays;\n import java.util.Collection;\n+import java.util.Collections;\n \n public class HttpClientRequestAdapter implements ClientRequestAdapter {\n \n-    private final HttpClientRequest request;\n+    private final HttpClientRequest clientRequest;","path":"brave-http/src/main/java/com/github/kristofa/brave/http/HttpClientRequestAdapter.java","position":12,"original_position":12,"commit_id":"12f829384d3cef224f0a7e5001d95f3eccf376a5","original_commit_id":"12f829384d3cef224f0a7e5001d95f3eccf376a5","user":{"login":"adriancole","id":64215,"avatar_url":"https://avatars.githubusercontent.com/u/64215?v=3","gravatar_id":"","url":"https://api.github.com/users/adriancole","html_url":"https://github.com/adriancole","followers_url":"https://api.github.com/users/adriancole/followers","following_url":"https://api.github.com/users/adriancole/following{/other_user}","gists_url":"https://api.github.com/users/adriancole/gists{/gist_id}","starred_url":"https://api.github.com/users/adriancole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriancole/subscriptions","organizations_url":"https://api.github.com/users/adriancole/orgs","repos_url":"https://api.github.com/users/adriancole/repos","events_url":"https://api.github.com/users/adriancole/events{/privacy}","received_events_url":"https://api.github.com/users/adriancole/received_events","type":"User","site_admin":false},"body":"since this code is doing things for acts like saving allocations, might be worth profiling the difference between just making this protected vs making an overridable method.\r\n\r\nIf all you need is to access the field, I'd probably make it protected, keeps the scope down, as I don't think we should be changing the type of `HttpClientRequest` returned consumed by this adapter without explaining why.","created_at":"2016-09-28T00:14:00Z","updated_at":"2016-09-28T00:14:00Z","html_url":"https://github.com/openzipkin/brave/pull/244#discussion_r80822525","pull_request_url":"https://api.github.com/repos/openzipkin/brave/pulls/244","_links":{"self":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/comments/80822525"},"html":{"href":"https://github.com/openzipkin/brave/pull/244#discussion_r80822525"},"pull_request":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/244"}}},"pull_request":{"url":"https://api.github.com/repos/openzipkin/brave/pulls/244","id":86974289,"html_url":"https://github.com/openzipkin/brave/pull/244","diff_url":"https://github.com/openzipkin/brave/pull/244.diff","patch_url":"https://github.com/openzipkin/brave/pull/244.patch","issue_url":"https://api.github.com/repos/openzipkin/brave/issues/244","number":244,"state":"open","locked":false,"title":"Allow BraveOkHttpRequestResponseInterceptor handler injection","user":{"login":"schlosna","id":54594,"avatar_url":"https://avatars.githubusercontent.com/u/54594?v=3","gravatar_id":"","url":"https://api.github.com/users/schlosna","html_url":"https://github.com/schlosna","followers_url":"https://api.github.com/users/schlosna/followers","following_url":"https://api.github.com/users/schlosna/following{/other_user}","gists_url":"https://api.github.com/users/schlosna/gists{/gist_id}","starred_url":"https://api.github.com/users/schlosna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlosna/subscriptions","organizations_url":"https://api.github.com/users/schlosna/orgs","repos_url":"https://api.github.com/users/schlosna/repos","events_url":"https://api.github.com/users/schlosna/events{/privacy}","received_events_url":"https://api.github.com/users/schlosna/received_events","type":"User","site_admin":false},"body":"While instrumenting an OkHTTP client, realized we'd like to specify the behavior of the `HttpServerRequestAdapter` and `HttpClientRequestAdapter` to provide additional context (e.g. adding an annotation from an HTTP request header such as from `User-Agent`.\r\n\r\nAlso optimize HTTP client & server request adapters to avoid allocations when trace sampling is not enabled.\r\n\r\nAdds toString for Endpoint debugging.","created_at":"2016-09-27T17:23:38Z","updated_at":"2016-09-28T00:18:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fc0ceb17607205d675c61f2888bb02a69f4d26a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openzipkin/brave/pulls/244/commits","review_comments_url":"https://api.github.com/repos/openzipkin/brave/pulls/244/comments","review_comment_url":"https://api.github.com/repos/openzipkin/brave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openzipkin/brave/issues/244/comments","statuses_url":"https://api.github.com/repos/openzipkin/brave/statuses/12f829384d3cef224f0a7e5001d95f3eccf376a5","head":{"label":"schlosna:http-collector-adapter-extension","ref":"http-collector-adapter-extension","sha":"12f829384d3cef224f0a7e5001d95f3eccf376a5","user":{"login":"schlosna","id":54594,"avatar_url":"https://avatars.githubusercontent.com/u/54594?v=3","gravatar_id":"","url":"https://api.github.com/users/schlosna","html_url":"https://github.com/schlosna","followers_url":"https://api.github.com/users/schlosna/followers","following_url":"https://api.github.com/users/schlosna/following{/other_user}","gists_url":"https://api.github.com/users/schlosna/gists{/gist_id}","starred_url":"https://api.github.com/users/schlosna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlosna/subscriptions","organizations_url":"https://api.github.com/users/schlosna/orgs","repos_url":"https://api.github.com/users/schlosna/repos","events_url":"https://api.github.com/users/schlosna/events{/privacy}","received_events_url":"https://api.github.com/users/schlosna/received_events","type":"User","site_admin":false},"repo":{"id":65501853,"name":"brave","full_name":"schlosna/brave","owner":{"login":"schlosna","id":54594,"avatar_url":"https://avatars.githubusercontent.com/u/54594?v=3","gravatar_id":"","url":"https://api.github.com/users/schlosna","html_url":"https://github.com/schlosna","followers_url":"https://api.github.com/users/schlosna/followers","following_url":"https://api.github.com/users/schlosna/following{/other_user}","gists_url":"https://api.github.com/users/schlosna/gists{/gist_id}","starred_url":"https://api.github.com/users/schlosna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlosna/subscriptions","organizations_url":"https://api.github.com/users/schlosna/orgs","repos_url":"https://api.github.com/users/schlosna/repos","events_url":"https://api.github.com/users/schlosna/events{/privacy}","received_events_url":"https://api.github.com/users/schlosna/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schlosna/brave","description":"Java distributed tracing implementation compatible with Zipkin back-end services.","fork":true,"url":"https://api.github.com/repos/schlosna/brave","forks_url":"https://api.github.com/repos/schlosna/brave/forks","keys_url":"https://api.github.com/repos/schlosna/brave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schlosna/brave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schlosna/brave/teams","hooks_url":"https://api.github.com/repos/schlosna/brave/hooks","issue_events_url":"https://api.github.com/repos/schlosna/brave/issues/events{/number}","events_url":"https://api.github.com/repos/schlosna/brave/events","assignees_url":"https://api.github.com/repos/schlosna/brave/assignees{/user}","branches_url":"https://api.github.com/repos/schlosna/brave/branches{/branch}","tags_url":"https://api.github.com/repos/schlosna/brave/tags","blobs_url":"https://api.github.com/repos/schlosna/brave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schlosna/brave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schlosna/brave/git/refs{/sha}","trees_url":"https://api.github.com/repos/schlosna/brave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schlosna/brave/statuses/{sha}","languages_url":"https://api.github.com/repos/schlosna/brave/languages","stargazers_url":"https://api.github.com/repos/schlosna/brave/stargazers","contributors_url":"https://api.github.com/repos/schlosna/brave/contributors","subscribers_url":"https://api.github.com/repos/schlosna/brave/subscribers","subscription_url":"https://api.github.com/repos/schlosna/brave/subscription","commits_url":"https://api.github.com/repos/schlosna/brave/commits{/sha}","git_commits_url":"https://api.github.com/repos/schlosna/brave/git/commits{/sha}","comments_url":"https://api.github.com/repos/schlosna/brave/comments{/number}","issue_comment_url":"https://api.github.com/repos/schlosna/brave/issues/comments{/number}","contents_url":"https://api.github.com/repos/schlosna/brave/contents/{+path}","compare_url":"https://api.github.com/repos/schlosna/brave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schlosna/brave/merges","archive_url":"https://api.github.com/repos/schlosna/brave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schlosna/brave/downloads","issues_url":"https://api.github.com/repos/schlosna/brave/issues{/number}","pulls_url":"https://api.github.com/repos/schlosna/brave/pulls{/number}","milestones_url":"https://api.github.com/repos/schlosna/brave/milestones{/number}","notifications_url":"https://api.github.com/repos/schlosna/brave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schlosna/brave/labels{/name}","releases_url":"https://api.github.com/repos/schlosna/brave/releases{/id}","deployments_url":"https://api.github.com/repos/schlosna/brave/deployments","created_at":"2016-08-11T21:12:04Z","updated_at":"2016-09-26T06:01:42Z","pushed_at":"2016-09-27T17:19:39Z","git_url":"git://github.com/schlosna/brave.git","ssh_url":"git@github.com:schlosna/brave.git","clone_url":"https://github.com/schlosna/brave.git","svn_url":"https://github.com/schlosna/brave","homepage":"","size":1971,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"openzipkin:master","ref":"master","sha":"06e477b0f3dcab9aee12f1c8868043a90916b479","user":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"repo":{"id":9278888,"name":"brave","full_name":"openzipkin/brave","owner":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openzipkin/brave","description":"Java distributed tracing implementation compatible with Zipkin back-end services.","fork":false,"url":"https://api.github.com/repos/openzipkin/brave","forks_url":"https://api.github.com/repos/openzipkin/brave/forks","keys_url":"https://api.github.com/repos/openzipkin/brave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openzipkin/brave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openzipkin/brave/teams","hooks_url":"https://api.github.com/repos/openzipkin/brave/hooks","issue_events_url":"https://api.github.com/repos/openzipkin/brave/issues/events{/number}","events_url":"https://api.github.com/repos/openzipkin/brave/events","assignees_url":"https://api.github.com/repos/openzipkin/brave/assignees{/user}","branches_url":"https://api.github.com/repos/openzipkin/brave/branches{/branch}","tags_url":"https://api.github.com/repos/openzipkin/brave/tags","blobs_url":"https://api.github.com/repos/openzipkin/brave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openzipkin/brave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openzipkin/brave/git/refs{/sha}","trees_url":"https://api.github.com/repos/openzipkin/brave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openzipkin/brave/statuses/{sha}","languages_url":"https://api.github.com/repos/openzipkin/brave/languages","stargazers_url":"https://api.github.com/repos/openzipkin/brave/stargazers","contributors_url":"https://api.github.com/repos/openzipkin/brave/contributors","subscribers_url":"https://api.github.com/repos/openzipkin/brave/subscribers","subscription_url":"https://api.github.com/repos/openzipkin/brave/subscription","commits_url":"https://api.github.com/repos/openzipkin/brave/commits{/sha}","git_commits_url":"https://api.github.com/repos/openzipkin/brave/git/commits{/sha}","comments_url":"https://api.github.com/repos/openzipkin/brave/comments{/number}","issue_comment_url":"https://api.github.com/repos/openzipkin/brave/issues/comments{/number}","contents_url":"https://api.github.com/repos/openzipkin/brave/contents/{+path}","compare_url":"https://api.github.com/repos/openzipkin/brave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openzipkin/brave/merges","archive_url":"https://api.github.com/repos/openzipkin/brave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openzipkin/brave/downloads","issues_url":"https://api.github.com/repos/openzipkin/brave/issues{/number}","pulls_url":"https://api.github.com/repos/openzipkin/brave/pulls{/number}","milestones_url":"https://api.github.com/repos/openzipkin/brave/milestones{/number}","notifications_url":"https://api.github.com/repos/openzipkin/brave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openzipkin/brave/labels{/name}","releases_url":"https://api.github.com/repos/openzipkin/brave/releases{/id}","deployments_url":"https://api.github.com/repos/openzipkin/brave/deployments","created_at":"2013-04-07T15:48:18Z","updated_at":"2016-09-27T14:18:54Z","pushed_at":"2016-09-27T17:23:38Z","git_url":"git://github.com/openzipkin/brave.git","ssh_url":"git@github.com:openzipkin/brave.git","clone_url":"https://github.com/openzipkin/brave.git","svn_url":"https://github.com/openzipkin/brave","homepage":"","size":2369,"stargazers_count":457,"watchers_count":457,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":166,"mirror_url":null,"open_issues_count":35,"forks":166,"open_issues":35,"watchers":457,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/244"},"html":{"href":"https://github.com/openzipkin/brave/pull/244"},"issue":{"href":"https://api.github.com/repos/openzipkin/brave/issues/244"},"comments":{"href":"https://api.github.com/repos/openzipkin/brave/issues/244/comments"},"review_comments":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/244/comments"},"review_comment":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openzipkin/brave/pulls/244/commits"},"statuses":{"href":"https://api.github.com/repos/openzipkin/brave/statuses/12f829384d3cef224f0a7e5001d95f3eccf376a5"}}}}
{"actor":{"display_login":"adriancole"}}