{"action":"created","comment":{"url":"https://api.github.com/repos/opentracing/api-golang/pulls/comments/46241354","id":46241354,"diff_hunk":"@@ -34,21 +29,21 @@ The simplest starting point is `./global.go`. As early as possible, call\n If global singletons make you sad, use `opentracing.NewStandardTracer(...)`\n directly and manage ownership of the `opentracing.OpenTracer` explicitly.\n \n-#### Creating a Span given an existing Golang `context.Context`\n+#### Creating a Span given an existing Span\n \n-    func xyz(ctx context.Context, ...) {\n+    func xyz(parentSpan opentracing.Span, ...) {\n         ...\n-        sp, ctx := opentracing.StartSpan(\"span_name\", ctx)\n+        sp := opentracing.JoinTrace(\"span_name\", parentSpan)\n         defer sp.Finish()\n \t\tsp.Info(\"called xyz\")\n         ...\n     }\n \n-#### Creating a Span given an existing Span\n+#### Creating a Span given an existing Golang `context.Context`\n \n-    func xyz(parentSpan opentracing.Span, ...) {\n+    func xyz(goCtx context.Context, ...) {\n         ...\n-        sp, ctx := opentracing.StartSpan(\"span_name\", parentSpan)\n+        sp, goCtx := opentracing.JoinTrace(\"span_name\", goCtx).AddToGoContext(goCtx)","path":"opentracing/README.md","position":53,"original_position":53,"commit_id":"8ff646dfcdef929511d8cade8b59314776ccdbc6","original_commit_id":"8ff646dfcdef929511d8cade8b59314776ccdbc6","user":{"login":"bensigelman","id":2251553,"avatar_url":"https://avatars.githubusercontent.com/u/2251553?v=3","gravatar_id":"","url":"https://api.github.com/users/bensigelman","html_url":"https://github.com/bensigelman","followers_url":"https://api.github.com/users/bensigelman/followers","following_url":"https://api.github.com/users/bensigelman/following{/other_user}","gists_url":"https://api.github.com/users/bensigelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bensigelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensigelman/subscriptions","organizations_url":"https://api.github.com/users/bensigelman/orgs","repos_url":"https://api.github.com/users/bensigelman/repos","events_url":"https://api.github.com/users/bensigelman/events{/privacy}","received_events_url":"https://api.github.com/users/bensigelman/received_events","type":"User","site_admin":false},"body":"the `AddToGoContext` is my nod to `context.Context` ease-of-use.","created_at":"2015-12-01T05:25:22Z","updated_at":"2015-12-01T05:25:22Z","html_url":"https://github.com/opentracing/api-golang/pull/2#discussion_r46241354","pull_request_url":"https://api.github.com/repos/opentracing/api-golang/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/comments/46241354"},"html":{"href":"https://github.com/opentracing/api-golang/pull/2#discussion_r46241354"},"pull_request":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/opentracing/api-golang/pulls/2","id":52217515,"html_url":"https://github.com/opentracing/api-golang/pull/2","diff_url":"https://github.com/opentracing/api-golang/pull/2.diff","patch_url":"https://github.com/opentracing/api-golang/pull/2.patch","issue_url":"https://api.github.com/repos/opentracing/api-golang/issues/2","number":2,"state":"open","locked":false,"title":"RFC #2","user":{"login":"bensigelman","id":2251553,"avatar_url":"https://avatars.githubusercontent.com/u/2251553?v=3","gravatar_id":"","url":"https://api.github.com/users/bensigelman","html_url":"https://github.com/bensigelman","followers_url":"https://api.github.com/users/bensigelman/followers","following_url":"https://api.github.com/users/bensigelman/following{/other_user}","gists_url":"https://api.github.com/users/bensigelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bensigelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensigelman/subscriptions","organizations_url":"https://api.github.com/users/bensigelman/orgs","repos_url":"https://api.github.com/users/bensigelman/repos","events_url":"https://api.github.com/users/bensigelman/events{/privacy}","received_events_url":"https://api.github.com/users/bensigelman/received_events","type":"User","site_admin":false},"body":"I'll leave comments inline.\r\n\r\nI used RFC #1 as the diff base... feel free to compare against `master`, obviously!","created_at":"2015-12-01T05:23:26Z","updated_at":"2015-12-01T05:25:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd5c85c09e745381a13457e43447198a63c340f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opentracing/api-golang/pulls/2/commits","review_comments_url":"https://api.github.com/repos/opentracing/api-golang/pulls/2/comments","review_comment_url":"https://api.github.com/repos/opentracing/api-golang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentracing/api-golang/issues/2/comments","statuses_url":"https://api.github.com/repos/opentracing/api-golang/statuses/8ff646dfcdef929511d8cade8b59314776ccdbc6","head":{"label":"opentracing:changes/rfc-b","ref":"changes/rfc-b","sha":"8ff646dfcdef929511d8cade8b59314776ccdbc6","user":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"repo":{"id":46904685,"name":"api-golang","full_name":"opentracing/api-golang","owner":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentracing/api-golang","description":"","fork":false,"url":"https://api.github.com/repos/opentracing/api-golang","forks_url":"https://api.github.com/repos/opentracing/api-golang/forks","keys_url":"https://api.github.com/repos/opentracing/api-golang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing/api-golang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing/api-golang/teams","hooks_url":"https://api.github.com/repos/opentracing/api-golang/hooks","issue_events_url":"https://api.github.com/repos/opentracing/api-golang/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing/api-golang/events","assignees_url":"https://api.github.com/repos/opentracing/api-golang/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing/api-golang/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing/api-golang/tags","blobs_url":"https://api.github.com/repos/opentracing/api-golang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing/api-golang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing/api-golang/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing/api-golang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing/api-golang/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing/api-golang/languages","stargazers_url":"https://api.github.com/repos/opentracing/api-golang/stargazers","contributors_url":"https://api.github.com/repos/opentracing/api-golang/contributors","subscribers_url":"https://api.github.com/repos/opentracing/api-golang/subscribers","subscription_url":"https://api.github.com/repos/opentracing/api-golang/subscription","commits_url":"https://api.github.com/repos/opentracing/api-golang/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing/api-golang/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing/api-golang/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing/api-golang/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing/api-golang/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing/api-golang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing/api-golang/merges","archive_url":"https://api.github.com/repos/opentracing/api-golang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing/api-golang/downloads","issues_url":"https://api.github.com/repos/opentracing/api-golang/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing/api-golang/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing/api-golang/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing/api-golang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing/api-golang/labels{/name}","releases_url":"https://api.github.com/repos/opentracing/api-golang/releases{/id}","created_at":"2015-11-26T04:52:54Z","updated_at":"2015-11-26T06:12:55Z","pushed_at":"2015-12-01T05:23:26Z","git_url":"git://github.com/opentracing/api-golang.git","ssh_url":"git@github.com:opentracing/api-golang.git","clone_url":"https://github.com/opentracing/api-golang.git","svn_url":"https://github.com/opentracing/api-golang","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"opentracing:changes/rfc","ref":"changes/rfc","sha":"69f6d464b7bd4f0db35400fb69e8693a8d1896f1","user":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"repo":{"id":46904685,"name":"api-golang","full_name":"opentracing/api-golang","owner":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentracing/api-golang","description":"","fork":false,"url":"https://api.github.com/repos/opentracing/api-golang","forks_url":"https://api.github.com/repos/opentracing/api-golang/forks","keys_url":"https://api.github.com/repos/opentracing/api-golang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing/api-golang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing/api-golang/teams","hooks_url":"https://api.github.com/repos/opentracing/api-golang/hooks","issue_events_url":"https://api.github.com/repos/opentracing/api-golang/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing/api-golang/events","assignees_url":"https://api.github.com/repos/opentracing/api-golang/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing/api-golang/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing/api-golang/tags","blobs_url":"https://api.github.com/repos/opentracing/api-golang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing/api-golang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing/api-golang/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing/api-golang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing/api-golang/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing/api-golang/languages","stargazers_url":"https://api.github.com/repos/opentracing/api-golang/stargazers","contributors_url":"https://api.github.com/repos/opentracing/api-golang/contributors","subscribers_url":"https://api.github.com/repos/opentracing/api-golang/subscribers","subscription_url":"https://api.github.com/repos/opentracing/api-golang/subscription","commits_url":"https://api.github.com/repos/opentracing/api-golang/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing/api-golang/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing/api-golang/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing/api-golang/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing/api-golang/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing/api-golang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing/api-golang/merges","archive_url":"https://api.github.com/repos/opentracing/api-golang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing/api-golang/downloads","issues_url":"https://api.github.com/repos/opentracing/api-golang/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing/api-golang/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing/api-golang/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing/api-golang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing/api-golang/labels{/name}","releases_url":"https://api.github.com/repos/opentracing/api-golang/releases{/id}","created_at":"2015-11-26T04:52:54Z","updated_at":"2015-11-26T06:12:55Z","pushed_at":"2015-12-01T05:23:26Z","git_url":"git://github.com/opentracing/api-golang.git","ssh_url":"git@github.com:opentracing/api-golang.git","clone_url":"https://github.com/opentracing/api-golang.git","svn_url":"https://github.com/opentracing/api-golang","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/2"},"html":{"href":"https://github.com/opentracing/api-golang/pull/2"},"issue":{"href":"https://api.github.com/repos/opentracing/api-golang/issues/2"},"comments":{"href":"https://api.github.com/repos/opentracing/api-golang/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentracing/api-golang/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/opentracing/api-golang/statuses/8ff646dfcdef929511d8cade8b59314776ccdbc6"}}}}