{"action":"opened","number":187,"pull_request":{"url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187","id":181737497,"html_url":"https://github.com/scoutapp/scout_apm_ruby/pull/187","diff_url":"https://github.com/scoutapp/scout_apm_ruby/pull/187.diff","patch_url":"https://github.com/scoutapp/scout_apm_ruby/pull/187.patch","issue_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/187","number":187,"state":"open","locked":false,"title":"Supports prepending exec_queries","user":{"login":"alindeman","id":395621,"avatar_url":"https://avatars2.githubusercontent.com/u/395621?v=4","gravatar_id":"","url":"https://api.github.com/users/alindeman","html_url":"https://github.com/alindeman","followers_url":"https://api.github.com/users/alindeman/followers","following_url":"https://api.github.com/users/alindeman/following{/other_user}","gists_url":"https://api.github.com/users/alindeman/gists{/gist_id}","starred_url":"https://api.github.com/users/alindeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alindeman/subscriptions","organizations_url":"https://api.github.com/users/alindeman/orgs","repos_url":"https://api.github.com/users/alindeman/repos","events_url":"https://api.github.com/users/alindeman/events{/privacy}","received_events_url":"https://api.github.com/users/alindeman/received_events","type":"User","site_admin":false},"body":"We've seen in #114 and #186 that `alias_method_chain` style chaining and `prepend` do not mix well. Infinite loops and blown stacks often result.\n\nThis PR proposes the first steps toward supporting `Module#prepend` in instruments by `prepend`ing a module to `ActiveRecord::Relation` if `prepend` is supported. It should resolve #186.\n\n`ActiveRecord::Relation` is a good candidate for prepending because it is a `Class` that we are prepending directly to. This is a pretty straightforward case without any edge cases that I can see.\n\nI try to keep the duplication to a minimum, even though several new conditionals are introduced. I'm interested in how this code strikes people, and if you think there are better options.\n\nRelates to #178 as well, though in #178 we tackle `Tracer`, rather than a specific instrument.","created_at":"2018-04-16T02:08:16Z","updated_at":"2018-04-16T02:08:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187/commits","review_comments_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187/comments","review_comment_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/187/comments","statuses_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/statuses/096f11eab48be2f60940b38f986af971bc3d4ff9","head":{"label":"alindeman:exec-queries-prepend","ref":"exec-queries-prepend","sha":"096f11eab48be2f60940b38f986af971bc3d4ff9","user":{"login":"alindeman","id":395621,"avatar_url":"https://avatars2.githubusercontent.com/u/395621?v=4","gravatar_id":"","url":"https://api.github.com/users/alindeman","html_url":"https://github.com/alindeman","followers_url":"https://api.github.com/users/alindeman/followers","following_url":"https://api.github.com/users/alindeman/following{/other_user}","gists_url":"https://api.github.com/users/alindeman/gists{/gist_id}","starred_url":"https://api.github.com/users/alindeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alindeman/subscriptions","organizations_url":"https://api.github.com/users/alindeman/orgs","repos_url":"https://api.github.com/users/alindeman/repos","events_url":"https://api.github.com/users/alindeman/events{/privacy}","received_events_url":"https://api.github.com/users/alindeman/received_events","type":"User","site_admin":false},"repo":{"id":119379745,"name":"scout_apm_ruby","full_name":"alindeman/scout_apm_ruby","owner":{"login":"alindeman","id":395621,"avatar_url":"https://avatars2.githubusercontent.com/u/395621?v=4","gravatar_id":"","url":"https://api.github.com/users/alindeman","html_url":"https://github.com/alindeman","followers_url":"https://api.github.com/users/alindeman/followers","following_url":"https://api.github.com/users/alindeman/following{/other_user}","gists_url":"https://api.github.com/users/alindeman/gists{/gist_id}","starred_url":"https://api.github.com/users/alindeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alindeman/subscriptions","organizations_url":"https://api.github.com/users/alindeman/orgs","repos_url":"https://api.github.com/users/alindeman/repos","events_url":"https://api.github.com/users/alindeman/events{/privacy}","received_events_url":"https://api.github.com/users/alindeman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alindeman/scout_apm_ruby","description":"Scout Ruby Application Monitoring Agent","fork":true,"url":"https://api.github.com/repos/alindeman/scout_apm_ruby","forks_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/forks","keys_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/teams","hooks_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/hooks","issue_events_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/issues/events{/number}","events_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/events","assignees_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/assignees{/user}","branches_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/branches{/branch}","tags_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/tags","blobs_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/languages","stargazers_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/stargazers","contributors_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/contributors","subscribers_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/subscribers","subscription_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/subscription","commits_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/contents/{+path}","compare_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/merges","archive_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/downloads","issues_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/issues{/number}","pulls_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/labels{/name}","releases_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/releases{/id}","deployments_url":"https://api.github.com/repos/alindeman/scout_apm_ruby/deployments","created_at":"2018-01-29T12:30:31Z","updated_at":"2018-01-29T12:30:32Z","pushed_at":"2018-04-16T02:01:33Z","git_url":"git://github.com/alindeman/scout_apm_ruby.git","ssh_url":"git@github.com:alindeman/scout_apm_ruby.git","clone_url":"https://github.com/alindeman/scout_apm_ruby.git","svn_url":"https://github.com/alindeman/scout_apm_ruby","homepage":"https://scoutapp.com","size":1829,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scoutapp:master","ref":"master","sha":"c060588869624ec97aea16e0a1ccf03071cb0b29","user":{"login":"scoutapp","id":458509,"avatar_url":"https://avatars1.githubusercontent.com/u/458509?v=4","gravatar_id":"","url":"https://api.github.com/users/scoutapp","html_url":"https://github.com/scoutapp","followers_url":"https://api.github.com/users/scoutapp/followers","following_url":"https://api.github.com/users/scoutapp/following{/other_user}","gists_url":"https://api.github.com/users/scoutapp/gists{/gist_id}","starred_url":"https://api.github.com/users/scoutapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoutapp/subscriptions","organizations_url":"https://api.github.com/users/scoutapp/orgs","repos_url":"https://api.github.com/users/scoutapp/repos","events_url":"https://api.github.com/users/scoutapp/events{/privacy}","received_events_url":"https://api.github.com/users/scoutapp/received_events","type":"Organization","site_admin":false},"repo":{"id":38520082,"name":"scout_apm_ruby","full_name":"scoutapp/scout_apm_ruby","owner":{"login":"scoutapp","id":458509,"avatar_url":"https://avatars1.githubusercontent.com/u/458509?v=4","gravatar_id":"","url":"https://api.github.com/users/scoutapp","html_url":"https://github.com/scoutapp","followers_url":"https://api.github.com/users/scoutapp/followers","following_url":"https://api.github.com/users/scoutapp/following{/other_user}","gists_url":"https://api.github.com/users/scoutapp/gists{/gist_id}","starred_url":"https://api.github.com/users/scoutapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoutapp/subscriptions","organizations_url":"https://api.github.com/users/scoutapp/orgs","repos_url":"https://api.github.com/users/scoutapp/repos","events_url":"https://api.github.com/users/scoutapp/events{/privacy}","received_events_url":"https://api.github.com/users/scoutapp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scoutapp/scout_apm_ruby","description":"Scout Ruby Application Monitoring Agent","fork":false,"url":"https://api.github.com/repos/scoutapp/scout_apm_ruby","forks_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/forks","keys_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/teams","hooks_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/hooks","issue_events_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/events{/number}","events_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/events","assignees_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/assignees{/user}","branches_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/branches{/branch}","tags_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/tags","blobs_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/languages","stargazers_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/stargazers","contributors_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/contributors","subscribers_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/subscribers","subscription_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/subscription","commits_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/contents/{+path}","compare_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/merges","archive_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/downloads","issues_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues{/number}","pulls_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/labels{/name}","releases_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/releases{/id}","deployments_url":"https://api.github.com/repos/scoutapp/scout_apm_ruby/deployments","created_at":"2015-07-04T03:26:22Z","updated_at":"2018-04-13T08:05:06Z","pushed_at":"2018-04-16T02:01:35Z","git_url":"git://github.com/scoutapp/scout_apm_ruby.git","ssh_url":"git@github.com:scoutapp/scout_apm_ruby.git","clone_url":"https://github.com/scoutapp/scout_apm_ruby.git","svn_url":"https://github.com/scoutapp/scout_apm_ruby","homepage":"https://scoutapp.com","size":1919,"stargazers_count":62,"watchers_count":62,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":25,"open_issues":36,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187"},"html":{"href":"https://github.com/scoutapp/scout_apm_ruby/pull/187"},"issue":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/187"},"comments":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/scoutapp/scout_apm_ruby/statuses/096f11eab48be2f60940b38f986af971bc3d4ff9"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":30,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"alindeman"}}