{"action":"created","comment":{"url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/comments/196071444","pull_request_review_id":129554088,"id":196071444,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA3MTQ0NA==","diff_hunk":"@@ -110,3 +112,18 @@ func InjectSpan(r *http.Request) *http.Request {\n \t}\n \treturn r\n }\n+\n+// InjectHTTPTraceSpan Injects HttpTrace on the request\n+func InjectHTTPTraceSpan(r *http.Request, trace *httptrace.ClientTrace) *http.Request {","path":"span.go","position":19,"original_position":19,"commit_id":"90ea7bc916692479af23dcf7fc7f0a9d79a4b76b","original_commit_id":"90ea7bc916692479af23dcf7fc7f0a9d79a4b76b","user":{"login":"Tkanos","id":5888407,"node_id":"MDQ6VXNlcjU4ODg0MDc=","avatar_url":"https://avatars3.githubusercontent.com/u/5888407?v=4","gravatar_id":"","url":"https://api.github.com/users/Tkanos","html_url":"https://github.com/Tkanos","followers_url":"https://api.github.com/users/Tkanos/followers","following_url":"https://api.github.com/users/Tkanos/following{/other_user}","gists_url":"https://api.github.com/users/Tkanos/gists{/gist_id}","starred_url":"https://api.github.com/users/Tkanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tkanos/subscriptions","organizations_url":"https://api.github.com/users/Tkanos/orgs","repos_url":"https://api.github.com/users/Tkanos/repos","events_url":"https://api.github.com/users/Tkanos/events{/privacy}","received_events_url":"https://api.github.com/users/Tkanos/received_events","type":"User","site_admin":false},"body":"Hello @FrancoisPoinsot,\r\n\r\nI like the options pattern idea, but do you prefer the options pattern or the functional options pattern ?\r\n ","created_at":"2018-06-18T13:12:20Z","updated_at":"2018-06-18T13:12:20Z","html_url":"https://github.com/ricardo-ch/go-tracing/pull/16#discussion_r196071444","pull_request_url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/comments/196071444"},"html":{"href":"https://github.com/ricardo-ch/go-tracing/pull/16#discussion_r196071444"},"pull_request":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16"}},"in_reply_to_id":195925481},"pull_request":{"url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16","id":190995138,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwOTk1MTM4","html_url":"https://github.com/ricardo-ch/go-tracing/pull/16","diff_url":"https://github.com/ricardo-ch/go-tracing/pull/16.diff","patch_url":"https://github.com/ricardo-ch/go-tracing/pull/16.patch","issue_url":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/16","number":16,"state":"open","locked":false,"title":"Add the httptrace feature","user":{"login":"Tkanos","id":5888407,"node_id":"MDQ6VXNlcjU4ODg0MDc=","avatar_url":"https://avatars3.githubusercontent.com/u/5888407?v=4","gravatar_id":"","url":"https://api.github.com/users/Tkanos","html_url":"https://github.com/Tkanos","followers_url":"https://api.github.com/users/Tkanos/followers","following_url":"https://api.github.com/users/Tkanos/following{/other_user}","gists_url":"https://api.github.com/users/Tkanos/gists{/gist_id}","starred_url":"https://api.github.com/users/Tkanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tkanos/subscriptions","organizations_url":"https://api.github.com/users/Tkanos/orgs","repos_url":"https://api.github.com/users/Tkanos/repos","events_url":"https://api.github.com/users/Tkanos/events{/privacy}","received_events_url":"https://api.github.com/users/Tkanos/received_events","type":"User","site_admin":false},"body":"In order to be able to trace the latency of the connection. I use the httptrace package from golang.\r\nIf trace is nil, we can set a default one, that trace the basics (you can add more callback functions if you want, this basic was define by looking what was needed on https://github.com/tcnksm/go-httpstat)\r\n\r\nOn zipkin the big overview will give you some dots (with hover labels) :\r\n\r\n![zipkin span view](https://lh3.googleusercontent.com/4Axn8DI43vvaTblvif40UFT4cU2UHX04PJfyBGapabZIkUUqkLyhZKtMyTujZdJ6qv5QIWPQGH-uGRMYLkEI=w1853-h913)\r\n\r\nAnd if you open the span, you will see each log, and the time when it occured (allowing you to see the latency) :\r\n\r\n![zipkin span log](https://lh3.googleusercontent.com/4vJoIxsPhrZdGAARC-WhflFtbLt8f7Q6umHIKJaYwJpM0hHZ1n-4YsXCiUqp7b-HWS5SAR1dWziwtRc5SxY_=w1853-h913)","created_at":"2018-05-28T20:51:00Z","updated_at":"2018-06-18T13:12:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2e22855f3a87d52b1fab841c03e0e9b3f2b72d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16/commits","review_comments_url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16/comments","review_comment_url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/16/comments","statuses_url":"https://api.github.com/repos/ricardo-ch/go-tracing/statuses/90ea7bc916692479af23dcf7fc7f0a9d79a4b76b","head":{"label":"Tkanos:httptrace-integration","ref":"httptrace-integration","sha":"90ea7bc916692479af23dcf7fc7f0a9d79a4b76b","user":{"login":"Tkanos","id":5888407,"node_id":"MDQ6VXNlcjU4ODg0MDc=","avatar_url":"https://avatars3.githubusercontent.com/u/5888407?v=4","gravatar_id":"","url":"https://api.github.com/users/Tkanos","html_url":"https://github.com/Tkanos","followers_url":"https://api.github.com/users/Tkanos/followers","following_url":"https://api.github.com/users/Tkanos/following{/other_user}","gists_url":"https://api.github.com/users/Tkanos/gists{/gist_id}","starred_url":"https://api.github.com/users/Tkanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tkanos/subscriptions","organizations_url":"https://api.github.com/users/Tkanos/orgs","repos_url":"https://api.github.com/users/Tkanos/repos","events_url":"https://api.github.com/users/Tkanos/events{/privacy}","received_events_url":"https://api.github.com/users/Tkanos/received_events","type":"User","site_admin":false},"repo":{"id":135204887,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUyMDQ4ODc=","name":"go-tracing","full_name":"Tkanos/go-tracing","owner":{"login":"Tkanos","id":5888407,"node_id":"MDQ6VXNlcjU4ODg0MDc=","avatar_url":"https://avatars3.githubusercontent.com/u/5888407?v=4","gravatar_id":"","url":"https://api.github.com/users/Tkanos","html_url":"https://github.com/Tkanos","followers_url":"https://api.github.com/users/Tkanos/followers","following_url":"https://api.github.com/users/Tkanos/following{/other_user}","gists_url":"https://api.github.com/users/Tkanos/gists{/gist_id}","starred_url":"https://api.github.com/users/Tkanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tkanos/subscriptions","organizations_url":"https://api.github.com/users/Tkanos/orgs","repos_url":"https://api.github.com/users/Tkanos/repos","events_url":"https://api.github.com/users/Tkanos/events{/privacy}","received_events_url":"https://api.github.com/users/Tkanos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tkanos/go-tracing","description":"It's easy to use zipkin tracing in go","fork":true,"url":"https://api.github.com/repos/Tkanos/go-tracing","forks_url":"https://api.github.com/repos/Tkanos/go-tracing/forks","keys_url":"https://api.github.com/repos/Tkanos/go-tracing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tkanos/go-tracing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tkanos/go-tracing/teams","hooks_url":"https://api.github.com/repos/Tkanos/go-tracing/hooks","issue_events_url":"https://api.github.com/repos/Tkanos/go-tracing/issues/events{/number}","events_url":"https://api.github.com/repos/Tkanos/go-tracing/events","assignees_url":"https://api.github.com/repos/Tkanos/go-tracing/assignees{/user}","branches_url":"https://api.github.com/repos/Tkanos/go-tracing/branches{/branch}","tags_url":"https://api.github.com/repos/Tkanos/go-tracing/tags","blobs_url":"https://api.github.com/repos/Tkanos/go-tracing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tkanos/go-tracing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tkanos/go-tracing/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tkanos/go-tracing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tkanos/go-tracing/statuses/{sha}","languages_url":"https://api.github.com/repos/Tkanos/go-tracing/languages","stargazers_url":"https://api.github.com/repos/Tkanos/go-tracing/stargazers","contributors_url":"https://api.github.com/repos/Tkanos/go-tracing/contributors","subscribers_url":"https://api.github.com/repos/Tkanos/go-tracing/subscribers","subscription_url":"https://api.github.com/repos/Tkanos/go-tracing/subscription","commits_url":"https://api.github.com/repos/Tkanos/go-tracing/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tkanos/go-tracing/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tkanos/go-tracing/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tkanos/go-tracing/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tkanos/go-tracing/contents/{+path}","compare_url":"https://api.github.com/repos/Tkanos/go-tracing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tkanos/go-tracing/merges","archive_url":"https://api.github.com/repos/Tkanos/go-tracing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tkanos/go-tracing/downloads","issues_url":"https://api.github.com/repos/Tkanos/go-tracing/issues{/number}","pulls_url":"https://api.github.com/repos/Tkanos/go-tracing/pulls{/number}","milestones_url":"https://api.github.com/repos/Tkanos/go-tracing/milestones{/number}","notifications_url":"https://api.github.com/repos/Tkanos/go-tracing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tkanos/go-tracing/labels{/name}","releases_url":"https://api.github.com/repos/Tkanos/go-tracing/releases{/id}","deployments_url":"https://api.github.com/repos/Tkanos/go-tracing/deployments","created_at":"2018-05-28T20:12:28Z","updated_at":"2018-05-29T12:57:29Z","pushed_at":"2018-05-29T14:58:00Z","git_url":"git://github.com/Tkanos/go-tracing.git","ssh_url":"git@github.com:Tkanos/go-tracing.git","clone_url":"https://github.com/Tkanos/go-tracing.git","svn_url":"https://github.com/Tkanos/go-tracing","homepage":null,"size":22,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ricardo-ch:master","ref":"master","sha":"9c0565a180dea4c6c642cb693186a69c0662f17f","user":{"login":"ricardo-ch","id":21175289,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTc1Mjg5","avatar_url":"https://avatars1.githubusercontent.com/u/21175289?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardo-ch","html_url":"https://github.com/ricardo-ch","followers_url":"https://api.github.com/users/ricardo-ch/followers","following_url":"https://api.github.com/users/ricardo-ch/following{/other_user}","gists_url":"https://api.github.com/users/ricardo-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardo-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardo-ch/subscriptions","organizations_url":"https://api.github.com/users/ricardo-ch/orgs","repos_url":"https://api.github.com/users/ricardo-ch/repos","events_url":"https://api.github.com/users/ricardo-ch/events{/privacy}","received_events_url":"https://api.github.com/users/ricardo-ch/received_events","type":"Organization","site_admin":false},"repo":{"id":99807411,"node_id":"MDEwOlJlcG9zaXRvcnk5OTgwNzQxMQ==","name":"go-tracing","full_name":"ricardo-ch/go-tracing","owner":{"login":"ricardo-ch","id":21175289,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTc1Mjg5","avatar_url":"https://avatars1.githubusercontent.com/u/21175289?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardo-ch","html_url":"https://github.com/ricardo-ch","followers_url":"https://api.github.com/users/ricardo-ch/followers","following_url":"https://api.github.com/users/ricardo-ch/following{/other_user}","gists_url":"https://api.github.com/users/ricardo-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardo-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardo-ch/subscriptions","organizations_url":"https://api.github.com/users/ricardo-ch/orgs","repos_url":"https://api.github.com/users/ricardo-ch/repos","events_url":"https://api.github.com/users/ricardo-ch/events{/privacy}","received_events_url":"https://api.github.com/users/ricardo-ch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ricardo-ch/go-tracing","description":"It's easy to use zipkin tracing in go","fork":false,"url":"https://api.github.com/repos/ricardo-ch/go-tracing","forks_url":"https://api.github.com/repos/ricardo-ch/go-tracing/forks","keys_url":"https://api.github.com/repos/ricardo-ch/go-tracing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ricardo-ch/go-tracing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ricardo-ch/go-tracing/teams","hooks_url":"https://api.github.com/repos/ricardo-ch/go-tracing/hooks","issue_events_url":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/events{/number}","events_url":"https://api.github.com/repos/ricardo-ch/go-tracing/events","assignees_url":"https://api.github.com/repos/ricardo-ch/go-tracing/assignees{/user}","branches_url":"https://api.github.com/repos/ricardo-ch/go-tracing/branches{/branch}","tags_url":"https://api.github.com/repos/ricardo-ch/go-tracing/tags","blobs_url":"https://api.github.com/repos/ricardo-ch/go-tracing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ricardo-ch/go-tracing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ricardo-ch/go-tracing/git/refs{/sha}","trees_url":"https://api.github.com/repos/ricardo-ch/go-tracing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ricardo-ch/go-tracing/statuses/{sha}","languages_url":"https://api.github.com/repos/ricardo-ch/go-tracing/languages","stargazers_url":"https://api.github.com/repos/ricardo-ch/go-tracing/stargazers","contributors_url":"https://api.github.com/repos/ricardo-ch/go-tracing/contributors","subscribers_url":"https://api.github.com/repos/ricardo-ch/go-tracing/subscribers","subscription_url":"https://api.github.com/repos/ricardo-ch/go-tracing/subscription","commits_url":"https://api.github.com/repos/ricardo-ch/go-tracing/commits{/sha}","git_commits_url":"https://api.github.com/repos/ricardo-ch/go-tracing/git/commits{/sha}","comments_url":"https://api.github.com/repos/ricardo-ch/go-tracing/comments{/number}","issue_comment_url":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/comments{/number}","contents_url":"https://api.github.com/repos/ricardo-ch/go-tracing/contents/{+path}","compare_url":"https://api.github.com/repos/ricardo-ch/go-tracing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ricardo-ch/go-tracing/merges","archive_url":"https://api.github.com/repos/ricardo-ch/go-tracing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ricardo-ch/go-tracing/downloads","issues_url":"https://api.github.com/repos/ricardo-ch/go-tracing/issues{/number}","pulls_url":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls{/number}","milestones_url":"https://api.github.com/repos/ricardo-ch/go-tracing/milestones{/number}","notifications_url":"https://api.github.com/repos/ricardo-ch/go-tracing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ricardo-ch/go-tracing/labels{/name}","releases_url":"https://api.github.com/repos/ricardo-ch/go-tracing/releases{/id}","deployments_url":"https://api.github.com/repos/ricardo-ch/go-tracing/deployments","created_at":"2017-08-09T12:46:01Z","updated_at":"2018-05-29T09:37:57Z","pushed_at":"2018-05-29T14:58:02Z","git_url":"git://github.com/ricardo-ch/go-tracing.git","ssh_url":"git@github.com:ricardo-ch/go-tracing.git","clone_url":"https://github.com/ricardo-ch/go-tracing.git","svn_url":"https://github.com/ricardo-ch/go-tracing","homepage":null,"size":19,"stargazers_count":26,"watchers_count":26,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":3,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16"},"html":{"href":"https://github.com/ricardo-ch/go-tracing/pull/16"},"issue":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/16"},"comments":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/ricardo-ch/go-tracing/statuses/90ea7bc916692479af23dcf7fc7f0a9d79a4b76b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Tkanos"}}