{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/comments/79736767","id":79736767,"diff_hunk":"@@ -132,33 +132,35 @@ The trace configuration additionally exposes the `samplingRate` option which set\n \n ## Custom Tracing API\n \n-The custom tracing API can be used to add custom spans to trace. A *span* is a particular unit of work within a trace, such as an RPC request. Currently, you can only use the custom tracing API inside the following web frameworks: `express`, `hapi`, `restify`.\n+The custom tracing API can be used to add custom spans to trace. A *span* is a particular unit of work within a trace, such as an RPC request. Spans may be nested; the outermost span is called a *root span*, even if there are no nested child spans. In general, root spans typically correspond to incoming requests, while *child spans* typically correspond to outgoing requests, or other work that is triggered in response to incoming requests.","path":"README.md","position":5,"original_position":5,"commit_id":"09626838e2994913a34cd9ab27bf5d40373689d2","original_commit_id":"09626838e2994913a34cd9ab27bf5d40373689d2","user":{"login":"kjin","id":2365820,"avatar_url":"https://avatars.githubusercontent.com/u/2365820?v=3","gravatar_id":"","url":"https://api.github.com/users/kjin","html_url":"https://github.com/kjin","followers_url":"https://api.github.com/users/kjin/followers","following_url":"https://api.github.com/users/kjin/following{/other_user}","gists_url":"https://api.github.com/users/kjin/gists{/gist_id}","starred_url":"https://api.github.com/users/kjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjin/subscriptions","organizations_url":"https://api.github.com/users/kjin/orgs","repos_url":"https://api.github.com/users/kjin/repos","events_url":"https://api.github.com/users/kjin/events{/privacy}","received_events_url":"https://api.github.com/users/kjin/received_events","type":"User","site_admin":false},"body":"I think it is necessary to note this since I mention an 'outermost' span immediately afterwards. It doesn't say anywhere else in the document that spans may be nested, and it may not be immediately obvious from its standard usage in web frameworks, since users never have to deal with root spans on their own.","created_at":"2016-09-20T23:45:46Z","updated_at":"2016-09-20T23:45:46Z","html_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302#discussion_r79736767","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/comments/79736767"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302#discussion_r79736767"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302","id":85895209,"html_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302","diff_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302.diff","patch_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/302","number":302,"state":"open","locked":false,"title":"Added Custom Root Spans","user":{"login":"kjin","id":2365820,"avatar_url":"https://avatars.githubusercontent.com/u/2365820?v=3","gravatar_id":"","url":"https://api.github.com/users/kjin","html_url":"https://github.com/kjin","followers_url":"https://api.github.com/users/kjin/followers","following_url":"https://api.github.com/users/kjin/following{/other_user}","gists_url":"https://api.github.com/users/kjin/gists{/gist_id}","starred_url":"https://api.github.com/users/kjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjin/subscriptions","organizations_url":"https://api.github.com/users/kjin/orgs","repos_url":"https://api.github.com/users/kjin/repos","events_url":"https://api.github.com/users/kjin/events{/privacy}","received_events_url":"https://api.github.com/users/kjin/received_events","type":"User","site_admin":false},"body":"The trace agent now exposes a new method `runInRootSpan` with a similar signature to `runInSpan`. It is intended for users to create custom top-level spans.","created_at":"2016-09-20T01:01:10Z","updated_at":"2016-09-20T23:45:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90afeb282add75fb509bc9f29d7bdb80aa105db1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/302/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/statuses/09626838e2994913a34cd9ab27bf5d40373689d2","head":{"label":"kjin:top-level-trace-spans","ref":"top-level-trace-spans","sha":"09626838e2994913a34cd9ab27bf5d40373689d2","user":{"login":"kjin","id":2365820,"avatar_url":"https://avatars.githubusercontent.com/u/2365820?v=3","gravatar_id":"","url":"https://api.github.com/users/kjin","html_url":"https://github.com/kjin","followers_url":"https://api.github.com/users/kjin/followers","following_url":"https://api.github.com/users/kjin/following{/other_user}","gists_url":"https://api.github.com/users/kjin/gists{/gist_id}","starred_url":"https://api.github.com/users/kjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjin/subscriptions","organizations_url":"https://api.github.com/users/kjin/orgs","repos_url":"https://api.github.com/users/kjin/repos","events_url":"https://api.github.com/users/kjin/events{/privacy}","received_events_url":"https://api.github.com/users/kjin/received_events","type":"User","site_admin":false},"repo":{"id":68134606,"name":"cloud-trace-nodejs","full_name":"kjin/cloud-trace-nodejs","owner":{"login":"kjin","id":2365820,"avatar_url":"https://avatars.githubusercontent.com/u/2365820?v=3","gravatar_id":"","url":"https://api.github.com/users/kjin","html_url":"https://github.com/kjin","followers_url":"https://api.github.com/users/kjin/followers","following_url":"https://api.github.com/users/kjin/following{/other_user}","gists_url":"https://api.github.com/users/kjin/gists{/gist_id}","starred_url":"https://api.github.com/users/kjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjin/subscriptions","organizations_url":"https://api.github.com/users/kjin/orgs","repos_url":"https://api.github.com/users/kjin/repos","events_url":"https://api.github.com/users/kjin/events{/privacy}","received_events_url":"https://api.github.com/users/kjin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kjin/cloud-trace-nodejs","description":"Experimental Node.js support for Google Cloud Trace","fork":true,"url":"https://api.github.com/repos/kjin/cloud-trace-nodejs","forks_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/forks","keys_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/teams","hooks_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/hooks","issue_events_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/events","assignees_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/tags","blobs_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/languages","stargazers_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/stargazers","contributors_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/contributors","subscribers_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/subscribers","subscription_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/subscription","commits_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/merges","archive_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/downloads","issues_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/kjin/cloud-trace-nodejs/deployments","created_at":"2016-09-13T18:12:30Z","updated_at":"2016-09-13T18:12:32Z","pushed_at":"2016-09-20T18:29:56Z","git_url":"git://github.com/kjin/cloud-trace-nodejs.git","ssh_url":"git@github.com:kjin/cloud-trace-nodejs.git","clone_url":"https://github.com/kjin/cloud-trace-nodejs.git","svn_url":"https://github.com/kjin/cloud-trace-nodejs","homepage":"https://cloud.google.com/cloud-trace/","size":1176,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"e76203e56cd18e25bc480e6c55e19baf28900972","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":41170869,"name":"cloud-trace-nodejs","full_name":"GoogleCloudPlatform/cloud-trace-nodejs","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs","description":"Experimental Node.js support for Google Cloud Trace","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/deployments","created_at":"2015-08-21T18:23:09Z","updated_at":"2016-09-17T20:54:13Z","pushed_at":"2016-09-20T18:29:56Z","git_url":"git://github.com/GoogleCloudPlatform/cloud-trace-nodejs.git","ssh_url":"git@github.com:GoogleCloudPlatform/cloud-trace-nodejs.git","clone_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs.git","svn_url":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs","homepage":"https://cloud.google.com/cloud-trace/","size":1205,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":6,"forks":24,"open_issues":6,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/pull/302"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/302"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/issues/302/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/pulls/302/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-trace-nodejs/statuses/09626838e2994913a34cd9ab27bf5d40373689d2"}}}}
{"actor":{"display_login":"kjin"}}