{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/comments/203029217","pull_request_review_id":137837569,"id":203029217,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzAyOTIxNw==","diff_hunk":"@@ -16,26 +16,18 @@ def around_perform(*args)\n             yield\n             span.service = pin.service\n           end\n+        ensure\n+          pin.tracer.shutdown! if pin && pin.tracer\n         end\n       end\n     end\n   end\n end\n \n-Resque.before_first_fork do","path":"lib/ddtrace/contrib/resque/resque_job.rb","position":12,"original_position":12,"commit_id":"1b5c5a8b15995335410af59754d05e58659a160f","original_commit_id":"1b5c5a8b15995335410af59754d05e58659a160f","user":{"login":"pawelchcki","id":812891,"node_id":"MDQ6VXNlcjgxMjg5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/812891?v=4","gravatar_id":"","url":"https://api.github.com/users/pawelchcki","html_url":"https://github.com/pawelchcki","followers_url":"https://api.github.com/users/pawelchcki/followers","following_url":"https://api.github.com/users/pawelchcki/following{/other_user}","gists_url":"https://api.github.com/users/pawelchcki/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelchcki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelchcki/subscriptions","organizations_url":"https://api.github.com/users/pawelchcki/orgs","repos_url":"https://api.github.com/users/pawelchcki/repos","events_url":"https://api.github.com/users/pawelchcki/events{/privacy}","received_events_url":"https://api.github.com/users/pawelchcki/received_events","type":"User","site_admin":false},"body":"We want to ship it first as a beta release and before that do another round of testing.\r\n\r\nI've tested this change locally when developing it and coupled with some other improvements in separate PRs, it did flush and shutdown as quickly as `SyncWriter`.\r\n\r\nThis change is mostly driven by the fact that  `SyncWriter` performance deteriorates quite a bit under multithreaded setup.","created_at":"2018-07-17T13:50:44Z","updated_at":"2018-07-17T13:50:45Z","html_url":"https://github.com/DataDog/dd-trace-rb/pull/474#discussion_r203029217","pull_request_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/comments/203029217"},"html":{"href":"https://github.com/DataDog/dd-trace-rb/pull/474#discussion_r203029217"},"pull_request":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474"}},"in_reply_to_id":202948811},"pull_request":{"url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474","id":197394630,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3Mzk0NjMw","html_url":"https://github.com/DataDog/dd-trace-rb/pull/474","diff_url":"https://github.com/DataDog/dd-trace-rb/pull/474.diff","patch_url":"https://github.com/DataDog/dd-trace-rb/pull/474.patch","issue_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/474","number":474,"state":"open","locked":false,"title":"[resque] Shutdown tracer and flush data on job finish instead of using SyncWriter.","user":{"login":"pawelchcki","id":812891,"node_id":"MDQ6VXNlcjgxMjg5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/812891?v=4","gravatar_id":"","url":"https://api.github.com/users/pawelchcki","html_url":"https://github.com/pawelchcki","followers_url":"https://api.github.com/users/pawelchcki/followers","following_url":"https://api.github.com/users/pawelchcki/following{/other_user}","gists_url":"https://api.github.com/users/pawelchcki/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelchcki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelchcki/subscriptions","organizations_url":"https://api.github.com/users/pawelchcki/orgs","repos_url":"https://api.github.com/users/pawelchcki/repos","events_url":"https://api.github.com/users/pawelchcki/events{/privacy}","received_events_url":"https://api.github.com/users/pawelchcki/received_events","type":"User","site_admin":false},"body":"Using latest improvements to how shutdown is performed - we can safely and quickly flush all data manually when the job has finished running.\r\n\r\nIts faster and safer than SyncWriter that needs to spawn two threads and connection to the agent on each trace write.","created_at":"2018-06-26T11:48:12Z","updated_at":"2018-07-17T13:50:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59b9011199e6878b6699ef438a78e5fa1060903a","assignee":{"login":"pawelchcki","id":812891,"node_id":"MDQ6VXNlcjgxMjg5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/812891?v=4","gravatar_id":"","url":"https://api.github.com/users/pawelchcki","html_url":"https://github.com/pawelchcki","followers_url":"https://api.github.com/users/pawelchcki/followers","following_url":"https://api.github.com/users/pawelchcki/following{/other_user}","gists_url":"https://api.github.com/users/pawelchcki/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelchcki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelchcki/subscriptions","organizations_url":"https://api.github.com/users/pawelchcki/orgs","repos_url":"https://api.github.com/users/pawelchcki/repos","events_url":"https://api.github.com/users/pawelchcki/events{/privacy}","received_events_url":"https://api.github.com/users/pawelchcki/received_events","type":"User","site_admin":false},"assignees":[{"login":"pawelchcki","id":812891,"node_id":"MDQ6VXNlcjgxMjg5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/812891?v=4","gravatar_id":"","url":"https://api.github.com/users/pawelchcki","html_url":"https://github.com/pawelchcki","followers_url":"https://api.github.com/users/pawelchcki/followers","following_url":"https://api.github.com/users/pawelchcki/following{/other_user}","gists_url":"https://api.github.com/users/pawelchcki/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelchcki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelchcki/subscriptions","organizations_url":"https://api.github.com/users/pawelchcki/orgs","repos_url":"https://api.github.com/users/pawelchcki/repos","events_url":"https://api.github.com/users/pawelchcki/events{/privacy}","received_events_url":"https://api.github.com/users/pawelchcki/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":430451605,"node_id":"MDU6TGFiZWw0MzA0NTE2MDU=","url":"https://api.github.com/repos/DataDog/dd-trace-rb/labels/bug","name":"bug","color":"ee0701","default":true},{"id":454754024,"node_id":"MDU6TGFiZWw0NTQ3NTQwMjQ=","url":"https://api.github.com/repos/DataDog/dd-trace-rb/labels/core","name":"core","color":"e39551","default":false}],"milestone":{"url":"https://api.github.com/repos/DataDog/dd-trace-rb/milestones/25","html_url":"https://github.com/DataDog/dd-trace-rb/milestone/25","labels_url":"https://api.github.com/repos/DataDog/dd-trace-rb/milestones/25/labels","id":3428582,"node_id":"MDk6TWlsZXN0b25lMzQyODU4Mg==","number":25,"title":"0.14.0","description":"Feature release of the 0.14.x branch.","creator":{"login":"delner","id":3237131,"node_id":"MDQ6VXNlcjMyMzcxMzE=","avatar_url":"https://avatars1.githubusercontent.com/u/3237131?v=4","gravatar_id":"","url":"https://api.github.com/users/delner","html_url":"https://github.com/delner","followers_url":"https://api.github.com/users/delner/followers","following_url":"https://api.github.com/users/delner/following{/other_user}","gists_url":"https://api.github.com/users/delner/gists{/gist_id}","starred_url":"https://api.github.com/users/delner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delner/subscriptions","organizations_url":"https://api.github.com/users/delner/orgs","repos_url":"https://api.github.com/users/delner/repos","events_url":"https://api.github.com/users/delner/events{/privacy}","received_events_url":"https://api.github.com/users/delner/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":8,"state":"open","created_at":"2018-06-15T20:10:24Z","updated_at":"2018-07-16T16:45:24Z","due_on":"2018-07-24T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474/commits","review_comments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474/comments","review_comment_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/474/comments","statuses_url":"https://api.github.com/repos/DataDog/dd-trace-rb/statuses/1b5c5a8b15995335410af59754d05e58659a160f","head":{"label":"DataDog:bugfix/stop_using_sync_writer_for_resque","ref":"bugfix/stop_using_sync_writer_for_resque","sha":"1b5c5a8b15995335410af59754d05e58659a160f","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":66497320,"node_id":"MDEwOlJlcG9zaXRvcnk2NjQ5NzMyMA==","name":"dd-trace-rb","full_name":"DataDog/dd-trace-rb","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/dd-trace-rb","description":"Datadog Tracing Ruby Client","fork":false,"url":"https://api.github.com/repos/DataDog/dd-trace-rb","forks_url":"https://api.github.com/repos/DataDog/dd-trace-rb/forks","keys_url":"https://api.github.com/repos/DataDog/dd-trace-rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/dd-trace-rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/dd-trace-rb/teams","hooks_url":"https://api.github.com/repos/DataDog/dd-trace-rb/hooks","issue_events_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/dd-trace-rb/events","assignees_url":"https://api.github.com/repos/DataDog/dd-trace-rb/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/dd-trace-rb/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/dd-trace-rb/tags","blobs_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/dd-trace-rb/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/dd-trace-rb/languages","stargazers_url":"https://api.github.com/repos/DataDog/dd-trace-rb/stargazers","contributors_url":"https://api.github.com/repos/DataDog/dd-trace-rb/contributors","subscribers_url":"https://api.github.com/repos/DataDog/dd-trace-rb/subscribers","subscription_url":"https://api.github.com/repos/DataDog/dd-trace-rb/subscription","commits_url":"https://api.github.com/repos/DataDog/dd-trace-rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/dd-trace-rb/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/dd-trace-rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/dd-trace-rb/merges","archive_url":"https://api.github.com/repos/DataDog/dd-trace-rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/dd-trace-rb/downloads","issues_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/dd-trace-rb/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/dd-trace-rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/dd-trace-rb/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/dd-trace-rb/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/deployments","created_at":"2016-08-24T20:30:56Z","updated_at":"2018-07-16T20:55:10Z","pushed_at":"2018-07-17T08:13:02Z","git_url":"git://github.com/DataDog/dd-trace-rb.git","ssh_url":"git@github.com:DataDog/dd-trace-rb.git","clone_url":"https://github.com/DataDog/dd-trace-rb.git","svn_url":"https://github.com/DataDog/dd-trace-rb","homepage":"https://docs.datadoghq.com/tracing/","size":2375,"stargazers_count":44,"watchers_count":44,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":78,"open_issues":39,"watchers":44,"default_branch":"master"}},"base":{"label":"DataDog:0.14-dev","ref":"0.14-dev","sha":"4ac16f7bf89ccd82303eabf66ec24cd3dbe74b0b","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":66497320,"node_id":"MDEwOlJlcG9zaXRvcnk2NjQ5NzMyMA==","name":"dd-trace-rb","full_name":"DataDog/dd-trace-rb","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/dd-trace-rb","description":"Datadog Tracing Ruby Client","fork":false,"url":"https://api.github.com/repos/DataDog/dd-trace-rb","forks_url":"https://api.github.com/repos/DataDog/dd-trace-rb/forks","keys_url":"https://api.github.com/repos/DataDog/dd-trace-rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/dd-trace-rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/dd-trace-rb/teams","hooks_url":"https://api.github.com/repos/DataDog/dd-trace-rb/hooks","issue_events_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/dd-trace-rb/events","assignees_url":"https://api.github.com/repos/DataDog/dd-trace-rb/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/dd-trace-rb/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/dd-trace-rb/tags","blobs_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/dd-trace-rb/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/dd-trace-rb/languages","stargazers_url":"https://api.github.com/repos/DataDog/dd-trace-rb/stargazers","contributors_url":"https://api.github.com/repos/DataDog/dd-trace-rb/contributors","subscribers_url":"https://api.github.com/repos/DataDog/dd-trace-rb/subscribers","subscription_url":"https://api.github.com/repos/DataDog/dd-trace-rb/subscription","commits_url":"https://api.github.com/repos/DataDog/dd-trace-rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/dd-trace-rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/dd-trace-rb/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/dd-trace-rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/dd-trace-rb/merges","archive_url":"https://api.github.com/repos/DataDog/dd-trace-rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/dd-trace-rb/downloads","issues_url":"https://api.github.com/repos/DataDog/dd-trace-rb/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/dd-trace-rb/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/dd-trace-rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/dd-trace-rb/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/dd-trace-rb/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/dd-trace-rb/deployments","created_at":"2016-08-24T20:30:56Z","updated_at":"2018-07-16T20:55:10Z","pushed_at":"2018-07-17T08:13:02Z","git_url":"git://github.com/DataDog/dd-trace-rb.git","ssh_url":"git@github.com:DataDog/dd-trace-rb.git","clone_url":"https://github.com/DataDog/dd-trace-rb.git","svn_url":"https://github.com/DataDog/dd-trace-rb","homepage":"https://docs.datadoghq.com/tracing/","size":2375,"stargazers_count":44,"watchers_count":44,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":78,"open_issues":39,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474"},"html":{"href":"https://github.com/DataDog/dd-trace-rb/pull/474"},"issue":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/474"},"comments":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/dd-trace-rb/statuses/1b5c5a8b15995335410af59754d05e58659a160f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pawelchcki"}}