{"action":"created","comment":{"url":"https://api.github.com/repos/remind101/pkg/pulls/comments/30337792","id":30337792,"diff_hunk":"@@ -0,0 +1,59 @@\n+package middleware\n+\n+import (\n+\t\"fmt\"\n+\t\"github.com/remind101/nra\"\n+\t\"github.com/remind101/pkg/httpx\"\n+\t\"golang.org/x/net/context\"\n+\t\"net/http\"\n+)\n+\n+type NewRelicTracer struct {","path":"httpx/middleware/newrelic_tracer.go","position":11,"original_position":11,"commit_id":"821a5c1de8539e3bfd3b950dbbac36816bdc78ba","original_commit_id":"821a5c1de8539e3bfd3b950dbbac36816bdc78ba","user":{"login":"ejholmes","id":95166,"avatar_url":"https://avatars.githubusercontent.com/u/95166?v=3","gravatar_id":"","url":"https://api.github.com/users/ejholmes","html_url":"https://github.com/ejholmes","followers_url":"https://api.github.com/users/ejholmes/followers","following_url":"https://api.github.com/users/ejholmes/following{/other_user}","gists_url":"https://api.github.com/users/ejholmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ejholmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejholmes/subscriptions","organizations_url":"https://api.github.com/users/ejholmes/orgs","repos_url":"https://api.github.com/users/ejholmes/repos","events_url":"https://api.github.com/users/ejholmes/events{/privacy}","received_events_url":"https://api.github.com/users/ejholmes/received_events","type":"User","site_admin":false},"body":"In the docs for this, might wanna mention that this needs to be added downstream from the httpx.Router; so wrapping an httpx.Router won't work, you need to add it when adding a handler: `r.Handle(NewRelicTracing(h, ...))`.","created_at":"2015-05-14T16:46:30Z","updated_at":"2015-05-14T16:46:30Z","html_url":"https://github.com/remind101/pkg/pull/12#discussion_r30337792","pull_request_url":"https://api.github.com/repos/remind101/pkg/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/remind101/pkg/pulls/comments/30337792"},"html":{"href":"https://github.com/remind101/pkg/pull/12#discussion_r30337792"},"pull_request":{"href":"https://api.github.com/repos/remind101/pkg/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/remind101/pkg/pulls/12","id":35394139,"html_url":"https://github.com/remind101/pkg/pull/12","diff_url":"https://github.com/remind101/pkg/pull/12.diff","patch_url":"https://github.com/remind101/pkg/pull/12.patch","issue_url":"https://api.github.com/repos/remind101/pkg/issues/12","number":12,"state":"open","locked":false,"title":"Add middleware for new relic instrumentation","user":{"login":"sanjayprabhu","id":75855,"avatar_url":"https://avatars.githubusercontent.com/u/75855?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayprabhu","html_url":"https://github.com/sanjayprabhu","followers_url":"https://api.github.com/users/sanjayprabhu/followers","following_url":"https://api.github.com/users/sanjayprabhu/following{/other_user}","gists_url":"https://api.github.com/users/sanjayprabhu/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayprabhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayprabhu/subscriptions","organizations_url":"https://api.github.com/users/sanjayprabhu/orgs","repos_url":"https://api.github.com/users/sanjayprabhu/repos","events_url":"https://api.github.com/users/sanjayprabhu/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayprabhu/received_events","type":"User","site_admin":false},"body":"Integrates with https://github.com/remind101/nra for new relic transaction tracing.\r\n\r\nTODO\r\n- Test with newrelic\r\n- Figure out build. This is going to break the build on linux because this depends on the new relic agent sdk. I'm thinking about having the nra package build with a no-op implementation by default, but you could optionally link to the new relic agent if you wanted to. Not sure if that will work though. \r\n- Maybe add to `example/main.go`\r\n\r\ncc @ejholmes @bmarini ","created_at":"2015-05-14T05:00:58Z","updated_at":"2015-05-14T16:46:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a91fd689998825a77fdc1b2b3fecb22a16c5ed8d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/remind101/pkg/pulls/12/commits","review_comments_url":"https://api.github.com/repos/remind101/pkg/pulls/12/comments","review_comment_url":"https://api.github.com/repos/remind101/pkg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/remind101/pkg/issues/12/comments","statuses_url":"https://api.github.com/repos/remind101/pkg/statuses/821a5c1de8539e3bfd3b950dbbac36816bdc78ba","head":{"label":"remind101:add_nra","ref":"add_nra","sha":"821a5c1de8539e3bfd3b950dbbac36816bdc78ba","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":33279320,"name":"pkg","full_name":"remind101/pkg","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/pkg","description":"A layer of convenience of the Go stdlib","fork":false,"url":"https://api.github.com/repos/remind101/pkg","forks_url":"https://api.github.com/repos/remind101/pkg/forks","keys_url":"https://api.github.com/repos/remind101/pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/pkg/teams","hooks_url":"https://api.github.com/repos/remind101/pkg/hooks","issue_events_url":"https://api.github.com/repos/remind101/pkg/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/pkg/events","assignees_url":"https://api.github.com/repos/remind101/pkg/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/pkg/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/pkg/tags","blobs_url":"https://api.github.com/repos/remind101/pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/pkg/languages","stargazers_url":"https://api.github.com/repos/remind101/pkg/stargazers","contributors_url":"https://api.github.com/repos/remind101/pkg/contributors","subscribers_url":"https://api.github.com/repos/remind101/pkg/subscribers","subscription_url":"https://api.github.com/repos/remind101/pkg/subscription","commits_url":"https://api.github.com/repos/remind101/pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/pkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/pkg/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/pkg/merges","archive_url":"https://api.github.com/repos/remind101/pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/pkg/downloads","issues_url":"https://api.github.com/repos/remind101/pkg/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/pkg/labels{/name}","releases_url":"https://api.github.com/repos/remind101/pkg/releases{/id}","created_at":"2015-04-01T23:56:47Z","updated_at":"2015-05-08T13:16:18Z","pushed_at":"2015-05-14T05:01:01Z","git_url":"git://github.com/remind101/pkg.git","ssh_url":"git@github.com:remind101/pkg.git","clone_url":"https://github.com/remind101/pkg.git","svn_url":"https://github.com/remind101/pkg","homepage":"https://godoc.org/github.com/remind101/pkg","size":312,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"remind101:master","ref":"master","sha":"1ed45246b1373c7da5becb69aa3d90ae69f16177","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":33279320,"name":"pkg","full_name":"remind101/pkg","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/pkg","description":"A layer of convenience of the Go stdlib","fork":false,"url":"https://api.github.com/repos/remind101/pkg","forks_url":"https://api.github.com/repos/remind101/pkg/forks","keys_url":"https://api.github.com/repos/remind101/pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/pkg/teams","hooks_url":"https://api.github.com/repos/remind101/pkg/hooks","issue_events_url":"https://api.github.com/repos/remind101/pkg/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/pkg/events","assignees_url":"https://api.github.com/repos/remind101/pkg/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/pkg/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/pkg/tags","blobs_url":"https://api.github.com/repos/remind101/pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/pkg/languages","stargazers_url":"https://api.github.com/repos/remind101/pkg/stargazers","contributors_url":"https://api.github.com/repos/remind101/pkg/contributors","subscribers_url":"https://api.github.com/repos/remind101/pkg/subscribers","subscription_url":"https://api.github.com/repos/remind101/pkg/subscription","commits_url":"https://api.github.com/repos/remind101/pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/pkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/pkg/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/pkg/merges","archive_url":"https://api.github.com/repos/remind101/pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/pkg/downloads","issues_url":"https://api.github.com/repos/remind101/pkg/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/pkg/labels{/name}","releases_url":"https://api.github.com/repos/remind101/pkg/releases{/id}","created_at":"2015-04-01T23:56:47Z","updated_at":"2015-05-08T13:16:18Z","pushed_at":"2015-05-14T05:01:01Z","git_url":"git://github.com/remind101/pkg.git","ssh_url":"git@github.com:remind101/pkg.git","clone_url":"https://github.com/remind101/pkg.git","svn_url":"https://github.com/remind101/pkg","homepage":"https://godoc.org/github.com/remind101/pkg","size":312,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/remind101/pkg/pulls/12"},"html":{"href":"https://github.com/remind101/pkg/pull/12"},"issue":{"href":"https://api.github.com/repos/remind101/pkg/issues/12"},"comments":{"href":"https://api.github.com/repos/remind101/pkg/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/remind101/pkg/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/remind101/pkg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/remind101/pkg/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/remind101/pkg/statuses/821a5c1de8539e3bfd3b950dbbac36816bdc78ba"}}}}