{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/comments/45785485","id":45785485,"diff_hunk":"@@ -0,0 +1,35 @@\n+/*\r\n+ * Copyright 2015 the original author or authors.\r\n+ *\r\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n+ * you may not use this file except in compliance with the License.\r\n+ * You may obtain a copy of the License at\r\n+ *\r\n+ *      http://www.apache.org/licenses/LICENSE-2.0\r\n+ *\r\n+ * Unless required by applicable law or agreed to in writing, software\r\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n+ * See the License for the specific language governing permissions and\r\n+ * limitations under the License.\r\n+ */\r\n+\r\n+package org.springframework.cloud.sleuth.instrument.concurrent.executor.support;\r\n+\r\n+import org.springframework.cloud.sleuth.Trace;\r\n+import org.springframework.cloud.sleuth.instrument.TraceRunnable;\r\n+\r\n+/**\r\n+ * A helper class to decorate {@link Runnable} to {@link TraceRunnable}\r\n+ * @author Gaurav Rai Mazra\r\n+ *\r\n+ */\r\n+public class TraceRunnableSupport {\r\n+\tprivate TraceRunnableSupport() {\r\n+\t\t\r\n+\t}\r\n+\t\r\n+\tpublic static Runnable decorate(Trace trace, Runnable delegate) {\r","path":"spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/concurrent/executor/support/TraceRunnableSupport.java","position":32,"original_position":32,"commit_id":"46fdf4529ed66c9f5566d6467110ef9585d66652","original_commit_id":"46fdf4529ed66c9f5566d6467110ef9585d66652","user":{"login":"spencergibb","id":594085,"avatar_url":"https://avatars.githubusercontent.com/u/594085?v=3","gravatar_id":"","url":"https://api.github.com/users/spencergibb","html_url":"https://github.com/spencergibb","followers_url":"https://api.github.com/users/spencergibb/followers","following_url":"https://api.github.com/users/spencergibb/following{/other_user}","gists_url":"https://api.github.com/users/spencergibb/gists{/gist_id}","starred_url":"https://api.github.com/users/spencergibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencergibb/subscriptions","organizations_url":"https://api.github.com/users/spencergibb/orgs","repos_url":"https://api.github.com/users/spencergibb/repos","events_url":"https://api.github.com/users/spencergibb/events{/privacy}","received_events_url":"https://api.github.com/users/spencergibb/received_events","type":"User","site_admin":false},"body":"Seems redundant to me. Just replace it with new TraceRunnable(trace, delegate);","created_at":"2015-11-24T19:51:53Z","updated_at":"2015-11-24T19:51:53Z","html_url":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58#discussion_r45785485","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/comments/45785485"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58#discussion_r45785485"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58","id":51686825,"html_url":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58","diff_url":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/58","number":58,"state":"open","locked":false,"title":"Providing support to enable tracing in Executors viz. java.unit.concurrent package","user":{"login":"gauravrmazra","id":6649207,"avatar_url":"https://avatars.githubusercontent.com/u/6649207?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravrmazra","html_url":"https://github.com/gauravrmazra","followers_url":"https://api.github.com/users/gauravrmazra/followers","following_url":"https://api.github.com/users/gauravrmazra/following{/other_user}","gists_url":"https://api.github.com/users/gauravrmazra/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravrmazra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravrmazra/subscriptions","organizations_url":"https://api.github.com/users/gauravrmazra/orgs","repos_url":"https://api.github.com/users/gauravrmazra/repos","events_url":"https://api.github.com/users/gauravrmazra/events{/privacy}","received_events_url":"https://api.github.com/users/gauravrmazra/received_events","type":"User","site_admin":false},"body":"Hi Dave, Spencer Gibb,\r\n\r\nHi have added classes to provide support for tracing in executors. I was evaluating to use spring-cloud-sleuth in one of our project for tracing. I saw it was not providing support for Executors. Now, I have written a glue code to provide support, this is what I wrote to support spring-cloud-sleuth in our application. I hope this will be helpful to this project as well. \r\n\r\nRegards,\r\nGaurav","created_at":"2015-11-24T16:58:15Z","updated_at":"2015-11-24T19:51:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0078124e2f2456ca9218fbe5878623da1fce2bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/58/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/statuses/46fdf4529ed66c9f5566d6467110ef9585d66652","head":{"label":"gauravrmazra:master","ref":"master","sha":"46fdf4529ed66c9f5566d6467110ef9585d66652","user":{"login":"gauravrmazra","id":6649207,"avatar_url":"https://avatars.githubusercontent.com/u/6649207?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravrmazra","html_url":"https://github.com/gauravrmazra","followers_url":"https://api.github.com/users/gauravrmazra/followers","following_url":"https://api.github.com/users/gauravrmazra/following{/other_user}","gists_url":"https://api.github.com/users/gauravrmazra/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravrmazra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravrmazra/subscriptions","organizations_url":"https://api.github.com/users/gauravrmazra/orgs","repos_url":"https://api.github.com/users/gauravrmazra/repos","events_url":"https://api.github.com/users/gauravrmazra/events{/privacy}","received_events_url":"https://api.github.com/users/gauravrmazra/received_events","type":"User","site_admin":false},"repo":{"id":46555253,"name":"spring-cloud-sleuth","full_name":"gauravrmazra/spring-cloud-sleuth","owner":{"login":"gauravrmazra","id":6649207,"avatar_url":"https://avatars.githubusercontent.com/u/6649207?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravrmazra","html_url":"https://github.com/gauravrmazra","followers_url":"https://api.github.com/users/gauravrmazra/followers","following_url":"https://api.github.com/users/gauravrmazra/following{/other_user}","gists_url":"https://api.github.com/users/gauravrmazra/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravrmazra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravrmazra/subscriptions","organizations_url":"https://api.github.com/users/gauravrmazra/orgs","repos_url":"https://api.github.com/users/gauravrmazra/repos","events_url":"https://api.github.com/users/gauravrmazra/events{/privacy}","received_events_url":"https://api.github.com/users/gauravrmazra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gauravrmazra/spring-cloud-sleuth","description":"Distributed tracing for spring cloud","fork":true,"url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth","forks_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/forks","keys_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/teams","hooks_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/hooks","issue_events_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/issues/events{/number}","events_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/events","assignees_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/assignees{/user}","branches_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/branches{/branch}","tags_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/tags","blobs_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/git/refs{/sha}","trees_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/statuses/{sha}","languages_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/languages","stargazers_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/stargazers","contributors_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/contributors","subscribers_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/subscribers","subscription_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/subscription","commits_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/commits{/sha}","git_commits_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/git/commits{/sha}","comments_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/comments{/number}","issue_comment_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/issues/comments{/number}","contents_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/contents/{+path}","compare_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/merges","archive_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/downloads","issues_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/issues{/number}","pulls_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/pulls{/number}","milestones_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/milestones{/number}","notifications_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/labels{/name}","releases_url":"https://api.github.com/repos/gauravrmazra/spring-cloud-sleuth/releases{/id}","created_at":"2015-11-20T10:24:33Z","updated_at":"2015-11-20T10:24:34Z","pushed_at":"2015-11-24T16:54:24Z","git_url":"git://github.com/gauravrmazra/spring-cloud-sleuth.git","ssh_url":"git@github.com:gauravrmazra/spring-cloud-sleuth.git","clone_url":"https://github.com/gauravrmazra/spring-cloud-sleuth.git","svn_url":"https://github.com/gauravrmazra/spring-cloud-sleuth","homepage":"http://cloud.spring.io","size":1358,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-cloud:master","ref":"master","sha":"2f253e035cab35c7471a7c24341b459a427372c6","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":31788540,"name":"spring-cloud-sleuth","full_name":"spring-cloud/spring-cloud-sleuth","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-sleuth","description":"Distributed tracing for spring cloud","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/releases{/id}","created_at":"2015-03-06T20:51:47Z","updated_at":"2015-11-22T21:16:44Z","pushed_at":"2015-11-24T16:58:15Z","git_url":"git://github.com/spring-cloud/spring-cloud-sleuth.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-sleuth.git","clone_url":"https://github.com/spring-cloud/spring-cloud-sleuth.git","svn_url":"https://github.com/spring-cloud/spring-cloud-sleuth","homepage":"http://cloud.spring.io","size":1399,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":17,"forks":13,"open_issues":17,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-sleuth/pull/58"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/58"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/statuses/46fdf4529ed66c9f5566d6467110ef9585d66652"}}}}