{"action":"created","comment":{"url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/comments/213183648","pull_request_review_id":149964957,"id":213183648,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzE4MzY0OA==","diff_hunk":"@@ -166,16 +166,40 @@\n         SpanBuilder withStartTimestamp(long microseconds);\n \n         /**\n+         * @deprecated use {@link #startActive} instead.\n          * Returns a newly started and activated {@link Scope}.\n          *\n          * <p>\n-         * The returned {@link Scope} supports try-with-resources. For example:\n+         * Note: {@link SpanBuilder#startActive(boolean)} is a shorthand for\n+         * {@code tracer.scopeManager().activate(spanBuilder.start(), finishSpanOnClose)}.\n+         *\n+         * @param finishSpanOnClose whether span should automatically be finished when {@link Scope#close()} is called\n+         * @return a {@link Scope}, already registered via the {@link ScopeManager}\n+         *\n+         * @see ScopeManager\n+         * @see Scope\n+         */\n+        @Deprecated\n+        Scope startActive(boolean finishSpanOnClose);\n+\n+        /**\n+         * Returns a newly started and activated {@link Scope}.\n+         *\n+         * The span will not be automatically finished when {@link Scope#close()} is called.\n+         *\n+         * <p>\n+         * The returned {@link Scope} supports try-with-resources, but is usually","path":"opentracing-api/src/main/java/io/opentracing/Tracer.java","position":27,"original_position":27,"commit_id":"81fe31a4f4ee7ba9d55b2b71109a23c21e514bab","original_commit_id":"81fe31a4f4ee7ba9d55b2b71109a23c21e514bab","user":{"login":"carlosalberto","id":260065,"node_id":"MDQ6VXNlcjI2MDA2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/260065?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosalberto","html_url":"https://github.com/carlosalberto","followers_url":"https://api.github.com/users/carlosalberto/followers","following_url":"https://api.github.com/users/carlosalberto/following{/other_user}","gists_url":"https://api.github.com/users/carlosalberto/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosalberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosalberto/subscriptions","organizations_url":"https://api.github.com/users/carlosalberto/orgs","repos_url":"https://api.github.com/users/carlosalberto/repos","events_url":"https://api.github.com/users/carlosalberto/events{/privacy}","received_events_url":"https://api.github.com/users/carlosalberto/received_events","type":"User","site_admin":false},"body":"That's related to Yuri's comment about removing it - essentially, that, as opposed to using `ScopeManager.activate()`, here we **need** an usual `try` block to do the cleanup (that is, having a reference to the `Span` to finish it after any error has occurred).\r\n\r\n```java\r\ntry (Scope scope = tracer.buildSpan(\"foo\").startActive()) {\r\n} catch (Exception e) {\r\n  // scope and scope.span() are not reachable here nor in the finally section :/\r\n}\r\n```","created_at":"2018-08-28T04:50:09Z","updated_at":"2018-08-28T04:50:10Z","html_url":"https://github.com/opentracing/opentracing-java/pull/301#discussion_r213183648","pull_request_url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/comments/213183648"},"html":{"href":"https://github.com/opentracing/opentracing-java/pull/301#discussion_r213183648"},"pull_request":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301"}},"in_reply_to_id":213057190},"pull_request":{"url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301","id":210974434,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwOTc0NDM0","html_url":"https://github.com/opentracing/opentracing-java/pull/301","diff_url":"https://github.com/opentracing/opentracing-java/pull/301.diff","patch_url":"https://github.com/opentracing/opentracing-java/pull/301.patch","issue_url":"https://api.github.com/repos/opentracing/opentracing-java/issues/301","number":301,"state":"open","locked":false,"title":"Remove finish span on close","user":{"login":"carlosalberto","id":260065,"node_id":"MDQ6VXNlcjI2MDA2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/260065?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosalberto","html_url":"https://github.com/carlosalberto","followers_url":"https://api.github.com/users/carlosalberto/followers","following_url":"https://api.github.com/users/carlosalberto/following{/other_user}","gists_url":"https://api.github.com/users/carlosalberto/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosalberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosalberto/subscriptions","organizations_url":"https://api.github.com/users/carlosalberto/orgs","repos_url":"https://api.github.com/users/carlosalberto/repos","events_url":"https://api.github.com/users/carlosalberto/events{/privacy}","received_events_url":"https://api.github.com/users/carlosalberto/received_events","type":"User","site_admin":false},"body":"Addresses #291 \r\n\r\n`SpanBuilder.startActive(Span, boolean)` and `ScopeManager.activate(Span, bool)` have been kept, but as deprecated methods.\r\n\r\nUpdated the `opentracing-testbed` code to use this change, and added a new, small, `error-reporting` case.\r\n\r\ncc @felixbarny @adriancole @yurishkuro @tedsuo @sjoerdtalsma ","created_at":"2018-08-26T22:26:33Z","updated_at":"2018-08-28T04:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14f6311602f1b34ff12d130c948f453fc6218bee","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301/commits","review_comments_url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301/comments","review_comment_url":"https://api.github.com/repos/opentracing/opentracing-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentracing/opentracing-java/issues/301/comments","statuses_url":"https://api.github.com/repos/opentracing/opentracing-java/statuses/81fe31a4f4ee7ba9d55b2b71109a23c21e514bab","head":{"label":"carlosalberto:remove_finish_span_on_close","ref":"remove_finish_span_on_close","sha":"81fe31a4f4ee7ba9d55b2b71109a23c21e514bab","user":{"login":"carlosalberto","id":260065,"node_id":"MDQ6VXNlcjI2MDA2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/260065?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosalberto","html_url":"https://github.com/carlosalberto","followers_url":"https://api.github.com/users/carlosalberto/followers","following_url":"https://api.github.com/users/carlosalberto/following{/other_user}","gists_url":"https://api.github.com/users/carlosalberto/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosalberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosalberto/subscriptions","organizations_url":"https://api.github.com/users/carlosalberto/orgs","repos_url":"https://api.github.com/users/carlosalberto/repos","events_url":"https://api.github.com/users/carlosalberto/events{/privacy}","received_events_url":"https://api.github.com/users/carlosalberto/received_events","type":"User","site_admin":false},"repo":{"id":102029758,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwMjk3NTg=","name":"opentracing-java","full_name":"carlosalberto/opentracing-java","owner":{"login":"carlosalberto","id":260065,"node_id":"MDQ6VXNlcjI2MDA2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/260065?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosalberto","html_url":"https://github.com/carlosalberto","followers_url":"https://api.github.com/users/carlosalberto/followers","following_url":"https://api.github.com/users/carlosalberto/following{/other_user}","gists_url":"https://api.github.com/users/carlosalberto/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosalberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosalberto/subscriptions","organizations_url":"https://api.github.com/users/carlosalberto/orgs","repos_url":"https://api.github.com/users/carlosalberto/repos","events_url":"https://api.github.com/users/carlosalberto/events{/privacy}","received_events_url":"https://api.github.com/users/carlosalberto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carlosalberto/opentracing-java","description":"OpenTracing API for Java","fork":true,"url":"https://api.github.com/repos/carlosalberto/opentracing-java","forks_url":"https://api.github.com/repos/carlosalberto/opentracing-java/forks","keys_url":"https://api.github.com/repos/carlosalberto/opentracing-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carlosalberto/opentracing-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carlosalberto/opentracing-java/teams","hooks_url":"https://api.github.com/repos/carlosalberto/opentracing-java/hooks","issue_events_url":"https://api.github.com/repos/carlosalberto/opentracing-java/issues/events{/number}","events_url":"https://api.github.com/repos/carlosalberto/opentracing-java/events","assignees_url":"https://api.github.com/repos/carlosalberto/opentracing-java/assignees{/user}","branches_url":"https://api.github.com/repos/carlosalberto/opentracing-java/branches{/branch}","tags_url":"https://api.github.com/repos/carlosalberto/opentracing-java/tags","blobs_url":"https://api.github.com/repos/carlosalberto/opentracing-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carlosalberto/opentracing-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carlosalberto/opentracing-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/carlosalberto/opentracing-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carlosalberto/opentracing-java/statuses/{sha}","languages_url":"https://api.github.com/repos/carlosalberto/opentracing-java/languages","stargazers_url":"https://api.github.com/repos/carlosalberto/opentracing-java/stargazers","contributors_url":"https://api.github.com/repos/carlosalberto/opentracing-java/contributors","subscribers_url":"https://api.github.com/repos/carlosalberto/opentracing-java/subscribers","subscription_url":"https://api.github.com/repos/carlosalberto/opentracing-java/subscription","commits_url":"https://api.github.com/repos/carlosalberto/opentracing-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/carlosalberto/opentracing-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/carlosalberto/opentracing-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/carlosalberto/opentracing-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/carlosalberto/opentracing-java/contents/{+path}","compare_url":"https://api.github.com/repos/carlosalberto/opentracing-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carlosalberto/opentracing-java/merges","archive_url":"https://api.github.com/repos/carlosalberto/opentracing-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carlosalberto/opentracing-java/downloads","issues_url":"https://api.github.com/repos/carlosalberto/opentracing-java/issues{/number}","pulls_url":"https://api.github.com/repos/carlosalberto/opentracing-java/pulls{/number}","milestones_url":"https://api.github.com/repos/carlosalberto/opentracing-java/milestones{/number}","notifications_url":"https://api.github.com/repos/carlosalberto/opentracing-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carlosalberto/opentracing-java/labels{/name}","releases_url":"https://api.github.com/repos/carlosalberto/opentracing-java/releases{/id}","deployments_url":"https://api.github.com/repos/carlosalberto/opentracing-java/deployments","created_at":"2017-08-31T18:02:48Z","updated_at":"2017-08-31T18:02:50Z","pushed_at":"2018-08-26T21:52:30Z","git_url":"git://github.com/carlosalberto/opentracing-java.git","ssh_url":"git@github.com:carlosalberto/opentracing-java.git","clone_url":"https://github.com/carlosalberto/opentracing-java.git","svn_url":"https://github.com/carlosalberto/opentracing-java","homepage":"http://opentracing.io","size":838,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"opentracing:v0.32.0","ref":"v0.32.0","sha":"d6c6509d5524f99039e34cbf121df79c46a25147","user":{"login":"opentracing","id":15482765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1NDgyNzY1","avatar_url":"https://avatars1.githubusercontent.com/u/15482765?v=4","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":48295629,"node_id":"MDEwOlJlcG9zaXRvcnk0ODI5NTYyOQ==","name":"opentracing-java","full_name":"opentracing/opentracing-java","owner":{"login":"opentracing","id":15482765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1NDgyNzY1","avatar_url":"https://avatars1.githubusercontent.com/u/15482765?v=4","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/opentracing-java","description":"OpenTracing API for Java","fork":false,"url":"https://api.github.com/repos/opentracing/opentracing-java","forks_url":"https://api.github.com/repos/opentracing/opentracing-java/forks","keys_url":"https://api.github.com/repos/opentracing/opentracing-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing/opentracing-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing/opentracing-java/teams","hooks_url":"https://api.github.com/repos/opentracing/opentracing-java/hooks","issue_events_url":"https://api.github.com/repos/opentracing/opentracing-java/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing/opentracing-java/events","assignees_url":"https://api.github.com/repos/opentracing/opentracing-java/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing/opentracing-java/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing/opentracing-java/tags","blobs_url":"https://api.github.com/repos/opentracing/opentracing-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing/opentracing-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing/opentracing-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing/opentracing-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing/opentracing-java/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing/opentracing-java/languages","stargazers_url":"https://api.github.com/repos/opentracing/opentracing-java/stargazers","contributors_url":"https://api.github.com/repos/opentracing/opentracing-java/contributors","subscribers_url":"https://api.github.com/repos/opentracing/opentracing-java/subscribers","subscription_url":"https://api.github.com/repos/opentracing/opentracing-java/subscription","commits_url":"https://api.github.com/repos/opentracing/opentracing-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing/opentracing-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing/opentracing-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing/opentracing-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing/opentracing-java/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing/opentracing-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing/opentracing-java/merges","archive_url":"https://api.github.com/repos/opentracing/opentracing-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing/opentracing-java/downloads","issues_url":"https://api.github.com/repos/opentracing/opentracing-java/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing/opentracing-java/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing/opentracing-java/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing/opentracing-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing/opentracing-java/labels{/name}","releases_url":"https://api.github.com/repos/opentracing/opentracing-java/releases{/id}","deployments_url":"https://api.github.com/repos/opentracing/opentracing-java/deployments","created_at":"2015-12-19T20:07:30Z","updated_at":"2018-08-23T12:55:10Z","pushed_at":"2018-08-26T22:26:34Z","git_url":"git://github.com/opentracing/opentracing-java.git","ssh_url":"git@github.com:opentracing/opentracing-java.git","clone_url":"https://github.com/opentracing/opentracing-java.git","svn_url":"https://github.com/opentracing/opentracing-java","homepage":"http://opentracing.io","size":703,"stargazers_count":813,"watchers_count":813,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":175,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":175,"open_issues":44,"watchers":813,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301"},"html":{"href":"https://github.com/opentracing/opentracing-java/pull/301"},"issue":{"href":"https://api.github.com/repos/opentracing/opentracing-java/issues/301"},"comments":{"href":"https://api.github.com/repos/opentracing/opentracing-java/issues/301/comments"},"review_comments":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301/comments"},"review_comment":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentracing/opentracing-java/pulls/301/commits"},"statuses":{"href":"https://api.github.com/repos/opentracing/opentracing-java/statuses/81fe31a4f4ee7ba9d55b2b71109a23c21e514bab"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"carlosalberto"}}