{"action":"closed","number":1379,"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379","id":52073887,"html_url":"https://github.com/phoenixframework/phoenix/pull/1379","diff_url":"https://github.com/phoenixframework/phoenix/pull/1379.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/1379.patch","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1379","number":1379,"state":"closed","locked":false,"title":"Various instrumentations","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"This PR adds a bunch of stuff:\r\n\r\n- `instrument/3-4` macros to `Phoenix.Endpoint`: we need this because we often don't have the endpoint at compile time, so we can't call `endpoint.instrument`\r\n- instrumentation for controller dispatching\r\n- instrumentation for controller rendering\r\n\r\n(this is what @josevalim suggested for now)\r\n\r\nThis works but I don't think it's very pretty. I can't think of a better way to do it now, but I feel we need generic instrumentation very strongly :( I would love to do\r\n\r\n```elixir\r\nconfig :phoenix, instrumenters: [...]\r\n\r\n# and also, for my custom instrumentations\r\nconfig :my_app, MyApp.Endpoint, instrumenters: [...]\r\n\r\n# and, why not\r\nconfig :postgrex, instrumenters: [...]\r\n\r\n# and so on\r\n```\r\n\r\nJust to write this down somewhere where it won't get buried (instead of IRC), the problem with this is that if I change the `:instrumenter` config for the `:phoenix` app (which is a dependency of `:my_app`), then phoenix will (obviously) not be recompiled. :( I think this problems extends to all dependencies that would want to use configuration at compile time, so maybe finding a solution could benefit more things other than instrumentation.\r\n\r\nStill, let's see how this goes!","created_at":"2015-11-29T23:12:00Z","updated_at":"2015-11-30T16:26:45Z","closed_at":"2015-11-30T16:26:45Z","merged_at":"2015-11-30T16:26:45Z","merge_commit_sha":"6e01796204f2055383bcedb999087f3c7b911f01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379/commits","review_comments_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379/comments","review_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1379/comments","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/34ab2a8194ed2555c34fbb2eac6835ae3107b355","head":{"label":"whatyouhide:various-instrumentations","ref":"various-instrumentations","sha":"34ab2a8194ed2555c34fbb2eac6835ae3107b355","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"repo":{"id":46942967,"name":"phoenix","full_name":"whatyouhide/phoenix","owner":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whatyouhide/phoenix","description":"Productive. Reliable. Fast.","fork":true,"url":"https://api.github.com/repos/whatyouhide/phoenix","forks_url":"https://api.github.com/repos/whatyouhide/phoenix/forks","keys_url":"https://api.github.com/repos/whatyouhide/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatyouhide/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatyouhide/phoenix/teams","hooks_url":"https://api.github.com/repos/whatyouhide/phoenix/hooks","issue_events_url":"https://api.github.com/repos/whatyouhide/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/whatyouhide/phoenix/events","assignees_url":"https://api.github.com/repos/whatyouhide/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/whatyouhide/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/whatyouhide/phoenix/tags","blobs_url":"https://api.github.com/repos/whatyouhide/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatyouhide/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatyouhide/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatyouhide/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatyouhide/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/whatyouhide/phoenix/languages","stargazers_url":"https://api.github.com/repos/whatyouhide/phoenix/stargazers","contributors_url":"https://api.github.com/repos/whatyouhide/phoenix/contributors","subscribers_url":"https://api.github.com/repos/whatyouhide/phoenix/subscribers","subscription_url":"https://api.github.com/repos/whatyouhide/phoenix/subscription","commits_url":"https://api.github.com/repos/whatyouhide/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatyouhide/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatyouhide/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatyouhide/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatyouhide/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/whatyouhide/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatyouhide/phoenix/merges","archive_url":"https://api.github.com/repos/whatyouhide/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatyouhide/phoenix/downloads","issues_url":"https://api.github.com/repos/whatyouhide/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/whatyouhide/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/whatyouhide/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/whatyouhide/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatyouhide/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/whatyouhide/phoenix/releases{/id}","created_at":"2015-11-26T19:05:06Z","updated_at":"2015-11-26T19:05:08Z","pushed_at":"2015-11-30T16:25:59Z","git_url":"git://github.com/whatyouhide/phoenix.git","ssh_url":"git@github.com:whatyouhide/phoenix.git","clone_url":"https://github.com/whatyouhide/phoenix.git","svn_url":"https://github.com/whatyouhide/phoenix","homepage":"http://www.phoenixframework.org","size":4061,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"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":"phoenixframework:master","ref":"master","sha":"6300ed4720ae49bfedb61bcffdb050e2175d6008","user":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"repo":{"id":16072585,"name":"phoenix","full_name":"phoenixframework/phoenix","owner":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phoenixframework/phoenix","description":"Productive. Reliable. Fast.","fork":false,"url":"https://api.github.com/repos/phoenixframework/phoenix","forks_url":"https://api.github.com/repos/phoenixframework/phoenix/forks","keys_url":"https://api.github.com/repos/phoenixframework/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoenixframework/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoenixframework/phoenix/teams","hooks_url":"https://api.github.com/repos/phoenixframework/phoenix/hooks","issue_events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/phoenixframework/phoenix/events","assignees_url":"https://api.github.com/repos/phoenixframework/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/phoenixframework/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/phoenixframework/phoenix/tags","blobs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoenixframework/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoenixframework/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/phoenixframework/phoenix/languages","stargazers_url":"https://api.github.com/repos/phoenixframework/phoenix/stargazers","contributors_url":"https://api.github.com/repos/phoenixframework/phoenix/contributors","subscribers_url":"https://api.github.com/repos/phoenixframework/phoenix/subscribers","subscription_url":"https://api.github.com/repos/phoenixframework/phoenix/subscription","commits_url":"https://api.github.com/repos/phoenixframework/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoenixframework/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoenixframework/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/phoenixframework/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoenixframework/phoenix/merges","archive_url":"https://api.github.com/repos/phoenixframework/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoenixframework/phoenix/downloads","issues_url":"https://api.github.com/repos/phoenixframework/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/phoenixframework/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/phoenixframework/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/phoenixframework/phoenix/releases{/id}","created_at":"2014-01-20T14:14:11Z","updated_at":"2015-11-30T14:51:13Z","pushed_at":"2015-11-30T16:26:45Z","git_url":"git://github.com/phoenixframework/phoenix.git","ssh_url":"git@github.com:phoenixframework/phoenix.git","clone_url":"https://github.com/phoenixframework/phoenix.git","svn_url":"https://github.com/phoenixframework/phoenix","homepage":"http://www.phoenixframework.org","size":4615,"stargazers_count":4705,"watchers_count":4705,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":506,"mirror_url":null,"open_issues_count":8,"forks":506,"open_issues":8,"watchers":4705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/1379"},"issue":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1379"},"comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1379/comments"},"review_comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379/comments"},"review_comment":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1379/commits"},"statuses":{"href":"https://api.github.com/repos/phoenixframework/phoenix/statuses/34ab2a8194ed2555c34fbb2eac6835ae3107b355"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"comments":9,"review_comments":23,"commits":8,"additions":120,"deletions":11,"changed_files":5}}