{"action":"created","comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/46057356","id":46057356,"diff_hunk":"@@ -0,0 +1,138 @@\n+defmodule Phoenix.Endpoint.Instrument do\n+  @doc false\n+  defmacro __using__(_opts) do\n+    quote unquote: false do\n+      # The `otp_app` variable is set by Phoenix.Endpoint.\n+      # TODO: maybe it's better to make Phoenix endpoints export __otp_app__()\n+      # or something similar?\n+      config        = Application.get_env(var!(otp_app), __MODULE__, [])\n+      instrumenters = config[:instrumentation] || []","path":"lib/phoenix/endpoint/instrumenter.ex","position":9,"original_position":9,"commit_id":"19380ad50d6487f916ecb930d54e009c17ce3933","original_commit_id":"19380ad50d6487f916ecb930d54e009c17ce3933","user":{"login":"lexmag","id":248290,"avatar_url":"https://avatars.githubusercontent.com/u/248290?v=3","gravatar_id":"","url":"https://api.github.com/users/lexmag","html_url":"https://github.com/lexmag","followers_url":"https://api.github.com/users/lexmag/followers","following_url":"https://api.github.com/users/lexmag/following{/other_user}","gists_url":"https://api.github.com/users/lexmag/gists{/gist_id}","starred_url":"https://api.github.com/users/lexmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexmag/subscriptions","organizations_url":"https://api.github.com/users/lexmag/orgs","repos_url":"https://api.github.com/users/lexmag/repos","events_url":"https://api.github.com/users/lexmag/events{/privacy}","received_events_url":"https://api.github.com/users/lexmag/received_events","type":"User","site_admin":false},"body":"Maybe better to use `Keyword.get/3` to stop it from silently working with `instrumentation: nil`?","created_at":"2015-11-27T15:56:19Z","updated_at":"2015-11-27T15:56:19Z","html_url":"https://github.com/phoenixframework/phoenix/pull/1375#discussion_r46057356","pull_request_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375","_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/46057356"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/1375#discussion_r46057356"},"pull_request":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375"}}},"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375","id":51940700,"html_url":"https://github.com/phoenixframework/phoenix/pull/1375","diff_url":"https://github.com/phoenixframework/phoenix/pull/1375.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/1375.patch","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1375","number":1375,"state":"open","locked":false,"title":"Lay the foundations for Phoenix.Instrument","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":"Let me know what you think, I'm pretty happy with how this is already coming out. :D :tada: ","created_at":"2015-11-26T19:06:00Z","updated_at":"2015-11-27T15:56:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6060ad07f77a0f486424578e4b90cf6477c0beaf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375/commits","review_comments_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375/comments","review_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1375/comments","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/19380ad50d6487f916ecb930d54e009c17ce3933","head":{"label":"whatyouhide:instrument","ref":"instrument","sha":"19380ad50d6487f916ecb930d54e009c17ce3933","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-27T15:29:53Z","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":4027,"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":"c51fcf506228c3081cc50ac4a35a8bd0b64d68e5","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-27T11:59:51Z","pushed_at":"2015-11-27T15:29:54Z","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":4506,"stargazers_count":4669,"watchers_count":4669,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":505,"mirror_url":null,"open_issues_count":10,"forks":505,"open_issues":10,"watchers":4669,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/1375"},"issue":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1375"},"comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1375/comments"},"review_comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375/comments"},"review_comment":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1375/commits"},"statuses":{"href":"https://api.github.com/repos/phoenixframework/phoenix/statuses/19380ad50d6487f916ecb930d54e009c17ce3933"}}}}