{"action":"created","comment":{"url":"https://api.github.com/repos/NYTimes/gizmo/pulls/comments/74614478","id":74614478,"diff_hunk":"@@ -306,16 +304,15 @@ func (s *SimpleServer) Register(svcI Service) error {\n \t\t// register all context endpoints with our wrapper\n \t\tfor path, epMethods := range mcs.JSONEndpoints() {\n \t\t\tfor method, ep := range epMethods {\n-\t\t\t\tendpointName := metricName(prefix, path, method)\n+\t\t\t\tfullPath := strings.TrimPrefix(prefix+path, \"/\")","path":"server/simple_server.go","position":113,"original_position":113,"commit_id":"99fab2b4814fcc03194fd6442014fa3b4f1756e2","original_commit_id":"99fab2b4814fcc03194fd6442014fa3b4f1756e2","user":{"login":"oliver-nyt","id":17011545,"avatar_url":"https://avatars.githubusercontent.com/u/17011545?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-nyt","html_url":"https://github.com/oliver-nyt","followers_url":"https://api.github.com/users/oliver-nyt/followers","following_url":"https://api.github.com/users/oliver-nyt/following{/other_user}","gists_url":"https://api.github.com/users/oliver-nyt/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-nyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-nyt/subscriptions","organizations_url":"https://api.github.com/users/oliver-nyt/orgs","repos_url":"https://api.github.com/users/oliver-nyt/repos","events_url":"https://api.github.com/users/oliver-nyt/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-nyt/received_events","type":"User","site_admin":false},"body":"Dunno, there's already a lot of repetition in the `Register()` functions. (something I'd love to get rid of / improve if you have suggestions).\r\n\r\nI don't really ned the prefix in `TimedAndCounted()` but I could pass it anyway and do the concatenate and trim in there. Thoughts?\r\n\r\n","created_at":"2016-08-12T15:52:21Z","updated_at":"2016-08-12T15:52:21Z","html_url":"https://github.com/NYTimes/gizmo/pull/69#discussion_r74614478","pull_request_url":"https://api.github.com/repos/NYTimes/gizmo/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/comments/74614478"},"html":{"href":"https://github.com/NYTimes/gizmo/pull/69#discussion_r74614478"},"pull_request":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/NYTimes/gizmo/pulls/69","id":81020376,"html_url":"https://github.com/NYTimes/gizmo/pull/69","diff_url":"https://github.com/NYTimes/gizmo/pull/69.diff","patch_url":"https://github.com/NYTimes/gizmo/pull/69.patch","issue_url":"https://api.github.com/repos/NYTimes/gizmo/issues/69","number":69,"state":"open","locked":false,"title":"Fix and refactor prometheus metrics setup","user":{"login":"oliver-nyt","id":17011545,"avatar_url":"https://avatars.githubusercontent.com/u/17011545?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-nyt","html_url":"https://github.com/oliver-nyt","followers_url":"https://api.github.com/users/oliver-nyt/followers","following_url":"https://api.github.com/users/oliver-nyt/following{/other_user}","gists_url":"https://api.github.com/users/oliver-nyt/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-nyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-nyt/subscriptions","organizations_url":"https://api.github.com/users/oliver-nyt/orgs","repos_url":"https://api.github.com/users/oliver-nyt/repos","events_url":"https://api.github.com/users/oliver-nyt/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-nyt/received_events","type":"User","site_admin":false},"body":"As discussed with @jprobinson - this fixes Prometheus metrics in gizmo by\r\n- not using invalid metric names but using the standard prometheus.InstrumentHandler() that will generate http_* metrics and use the full endpoint pathname as a label.\r\n- expose prometheus metrics at `/metrics`\r\n\r\n🍺 ","created_at":"2016-08-11T19:57:16Z","updated_at":"2016-08-12T15:52:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4e0aa25d35b94cbe955a032a294b6043bb5069b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NYTimes/gizmo/pulls/69/commits","review_comments_url":"https://api.github.com/repos/NYTimes/gizmo/pulls/69/comments","review_comment_url":"https://api.github.com/repos/NYTimes/gizmo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYTimes/gizmo/issues/69/comments","statuses_url":"https://api.github.com/repos/NYTimes/gizmo/statuses/99fab2b4814fcc03194fd6442014fa3b4f1756e2","head":{"label":"oliver-nyt:oh_fix_prometheus_metrics","ref":"oh_fix_prometheus_metrics","sha":"99fab2b4814fcc03194fd6442014fa3b4f1756e2","user":{"login":"oliver-nyt","id":17011545,"avatar_url":"https://avatars.githubusercontent.com/u/17011545?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-nyt","html_url":"https://github.com/oliver-nyt","followers_url":"https://api.github.com/users/oliver-nyt/followers","following_url":"https://api.github.com/users/oliver-nyt/following{/other_user}","gists_url":"https://api.github.com/users/oliver-nyt/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-nyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-nyt/subscriptions","organizations_url":"https://api.github.com/users/oliver-nyt/orgs","repos_url":"https://api.github.com/users/oliver-nyt/repos","events_url":"https://api.github.com/users/oliver-nyt/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-nyt/received_events","type":"User","site_admin":false},"repo":{"id":65147416,"name":"gizmo","full_name":"oliver-nyt/gizmo","owner":{"login":"oliver-nyt","id":17011545,"avatar_url":"https://avatars.githubusercontent.com/u/17011545?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-nyt","html_url":"https://github.com/oliver-nyt","followers_url":"https://api.github.com/users/oliver-nyt/followers","following_url":"https://api.github.com/users/oliver-nyt/following{/other_user}","gists_url":"https://api.github.com/users/oliver-nyt/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-nyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-nyt/subscriptions","organizations_url":"https://api.github.com/users/oliver-nyt/orgs","repos_url":"https://api.github.com/users/oliver-nyt/repos","events_url":"https://api.github.com/users/oliver-nyt/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-nyt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oliver-nyt/gizmo","description":"A Microservice Toolkit from The New York Times","fork":true,"url":"https://api.github.com/repos/oliver-nyt/gizmo","forks_url":"https://api.github.com/repos/oliver-nyt/gizmo/forks","keys_url":"https://api.github.com/repos/oliver-nyt/gizmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oliver-nyt/gizmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oliver-nyt/gizmo/teams","hooks_url":"https://api.github.com/repos/oliver-nyt/gizmo/hooks","issue_events_url":"https://api.github.com/repos/oliver-nyt/gizmo/issues/events{/number}","events_url":"https://api.github.com/repos/oliver-nyt/gizmo/events","assignees_url":"https://api.github.com/repos/oliver-nyt/gizmo/assignees{/user}","branches_url":"https://api.github.com/repos/oliver-nyt/gizmo/branches{/branch}","tags_url":"https://api.github.com/repos/oliver-nyt/gizmo/tags","blobs_url":"https://api.github.com/repos/oliver-nyt/gizmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oliver-nyt/gizmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oliver-nyt/gizmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/oliver-nyt/gizmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oliver-nyt/gizmo/statuses/{sha}","languages_url":"https://api.github.com/repos/oliver-nyt/gizmo/languages","stargazers_url":"https://api.github.com/repos/oliver-nyt/gizmo/stargazers","contributors_url":"https://api.github.com/repos/oliver-nyt/gizmo/contributors","subscribers_url":"https://api.github.com/repos/oliver-nyt/gizmo/subscribers","subscription_url":"https://api.github.com/repos/oliver-nyt/gizmo/subscription","commits_url":"https://api.github.com/repos/oliver-nyt/gizmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/oliver-nyt/gizmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/oliver-nyt/gizmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/oliver-nyt/gizmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/oliver-nyt/gizmo/contents/{+path}","compare_url":"https://api.github.com/repos/oliver-nyt/gizmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oliver-nyt/gizmo/merges","archive_url":"https://api.github.com/repos/oliver-nyt/gizmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oliver-nyt/gizmo/downloads","issues_url":"https://api.github.com/repos/oliver-nyt/gizmo/issues{/number}","pulls_url":"https://api.github.com/repos/oliver-nyt/gizmo/pulls{/number}","milestones_url":"https://api.github.com/repos/oliver-nyt/gizmo/milestones{/number}","notifications_url":"https://api.github.com/repos/oliver-nyt/gizmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oliver-nyt/gizmo/labels{/name}","releases_url":"https://api.github.com/repos/oliver-nyt/gizmo/releases{/id}","deployments_url":"https://api.github.com/repos/oliver-nyt/gizmo/deployments","created_at":"2016-08-07T18:15:44Z","updated_at":"2016-08-07T18:15:45Z","pushed_at":"2016-08-11T20:18:19Z","git_url":"git://github.com/oliver-nyt/gizmo.git","ssh_url":"git@github.com:oliver-nyt/gizmo.git","clone_url":"https://github.com/oliver-nyt/gizmo.git","svn_url":"https://github.com/oliver-nyt/gizmo","homepage":"http://open.blogs.nytimes.com/2015/12/17/introducing-gizmo/","size":348,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"NYTimes:master","ref":"master","sha":"85962394668f000f7e4d09ef79554570a34bcf86","user":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"repo":{"id":48060472,"name":"gizmo","full_name":"NYTimes/gizmo","owner":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYTimes/gizmo","description":"A Microservice Toolkit from The New York Times","fork":false,"url":"https://api.github.com/repos/NYTimes/gizmo","forks_url":"https://api.github.com/repos/NYTimes/gizmo/forks","keys_url":"https://api.github.com/repos/NYTimes/gizmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYTimes/gizmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYTimes/gizmo/teams","hooks_url":"https://api.github.com/repos/NYTimes/gizmo/hooks","issue_events_url":"https://api.github.com/repos/NYTimes/gizmo/issues/events{/number}","events_url":"https://api.github.com/repos/NYTimes/gizmo/events","assignees_url":"https://api.github.com/repos/NYTimes/gizmo/assignees{/user}","branches_url":"https://api.github.com/repos/NYTimes/gizmo/branches{/branch}","tags_url":"https://api.github.com/repos/NYTimes/gizmo/tags","blobs_url":"https://api.github.com/repos/NYTimes/gizmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYTimes/gizmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYTimes/gizmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYTimes/gizmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYTimes/gizmo/statuses/{sha}","languages_url":"https://api.github.com/repos/NYTimes/gizmo/languages","stargazers_url":"https://api.github.com/repos/NYTimes/gizmo/stargazers","contributors_url":"https://api.github.com/repos/NYTimes/gizmo/contributors","subscribers_url":"https://api.github.com/repos/NYTimes/gizmo/subscribers","subscription_url":"https://api.github.com/repos/NYTimes/gizmo/subscription","commits_url":"https://api.github.com/repos/NYTimes/gizmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYTimes/gizmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYTimes/gizmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYTimes/gizmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYTimes/gizmo/contents/{+path}","compare_url":"https://api.github.com/repos/NYTimes/gizmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYTimes/gizmo/merges","archive_url":"https://api.github.com/repos/NYTimes/gizmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYTimes/gizmo/downloads","issues_url":"https://api.github.com/repos/NYTimes/gizmo/issues{/number}","pulls_url":"https://api.github.com/repos/NYTimes/gizmo/pulls{/number}","milestones_url":"https://api.github.com/repos/NYTimes/gizmo/milestones{/number}","notifications_url":"https://api.github.com/repos/NYTimes/gizmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYTimes/gizmo/labels{/name}","releases_url":"https://api.github.com/repos/NYTimes/gizmo/releases{/id}","deployments_url":"https://api.github.com/repos/NYTimes/gizmo/deployments","created_at":"2015-12-15T18:09:36Z","updated_at":"2016-08-12T09:59:47Z","pushed_at":"2016-08-12T05:36:08Z","git_url":"git://github.com/NYTimes/gizmo.git","ssh_url":"git@github.com:NYTimes/gizmo.git","clone_url":"https://github.com/NYTimes/gizmo.git","svn_url":"https://github.com/NYTimes/gizmo","homepage":"http://open.blogs.nytimes.com/2015/12/17/introducing-gizmo/","size":407,"stargazers_count":1472,"watchers_count":1472,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":6,"forks":81,"open_issues":6,"watchers":1472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/69"},"html":{"href":"https://github.com/NYTimes/gizmo/pull/69"},"issue":{"href":"https://api.github.com/repos/NYTimes/gizmo/issues/69"},"comments":{"href":"https://api.github.com/repos/NYTimes/gizmo/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYTimes/gizmo/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/NYTimes/gizmo/statuses/99fab2b4814fcc03194fd6442014fa3b4f1756e2"}}}}
{"actor":{"display_login":"oliver-nyt"}}