{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/43818470","id":43818470,"diff_hunk":"@@ -587,6 +590,24 @@ func (r *Request) Watch() (watch.Interface, error) {\n \treturn watch.NewStreamWatcher(watchjson.NewDecoder(resp.Body, r.codec)), nil\n }\n \n+// updateUrlMetrics is a convenience function for pushing metrics.\n+// It also handles corner cases for incomplete/invalid request data.\n+func updateUrlMetrics(req *Request, resp *http.Response, err error) {\n+\turl := \"none\"\n+\t// In unit tests, weird urls can occur.","path":"pkg/client/unversioned/request.go","position":18,"original_position":18,"commit_id":"8751b9bdf99ab94d77b5f070514b34bf2d642221","original_commit_id":"8751b9bdf99ab94d77b5f070514b34bf2d642221","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"body":"Agree, but am assuming that in general gaurding against nils is a good thing... probably ill just remove the comment, since in and of itself, checking nil is still a good thing to do.","created_at":"2015-11-03T22:45:32Z","updated_at":"2015-11-03T22:45:32Z","html_url":"https://github.com/kubernetes/kubernetes/pull/16271#discussion_r43818470","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/43818470"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16271#discussion_r43818470"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271","id":48740688,"html_url":"https://github.com/kubernetes/kubernetes/pull/16271","diff_url":"https://github.com/kubernetes/kubernetes/pull/16271.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/16271.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16271","number":16271,"state":"open","locked":false,"title":"HTTP Client request metrics: consolidating and adding request statuses.","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"body":"This adds the ability to graph errors (i.e. 409's 404s and so on) seen at the client level.\r\n\r\n- Purpose: This is Related to helping diagnose #16134 and confirming backoff behaviour improvements we are working on in #16100 .  \r\n\r\n- I also consolidated the metrics in `Do` and `DoRaw` here, because I think they are all ultimately calling the `request()` function.   Any initial thoughts @fgrzadkowski ?  ","created_at":"2015-10-26T13:46:49Z","updated_at":"2015-11-03T22:45:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf37bc0cfa72b4deee93923f1f9ef0cc519683c3","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16271/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8751b9bdf99ab94d77b5f070514b34bf2d642221","head":{"label":"jayunit100:hammer-backoff-metrics-part1","ref":"hammer-backoff-metrics-part1","sha":"8751b9bdf99ab94d77b5f070514b34bf2d642221","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"repo":{"id":28862683,"name":"kubernetes","full_name":"jayunit100/kubernetes","owner":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jayunit100/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/jayunit100/kubernetes","forks_url":"https://api.github.com/repos/jayunit100/kubernetes/forks","keys_url":"https://api.github.com/repos/jayunit100/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jayunit100/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jayunit100/kubernetes/teams","hooks_url":"https://api.github.com/repos/jayunit100/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jayunit100/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jayunit100/kubernetes/events","assignees_url":"https://api.github.com/repos/jayunit100/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jayunit100/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jayunit100/kubernetes/tags","blobs_url":"https://api.github.com/repos/jayunit100/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jayunit100/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jayunit100/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jayunit100/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jayunit100/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jayunit100/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jayunit100/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jayunit100/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jayunit100/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jayunit100/kubernetes/subscription","commits_url":"https://api.github.com/repos/jayunit100/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jayunit100/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jayunit100/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jayunit100/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jayunit100/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jayunit100/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jayunit100/kubernetes/merges","archive_url":"https://api.github.com/repos/jayunit100/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jayunit100/kubernetes/downloads","issues_url":"https://api.github.com/repos/jayunit100/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jayunit100/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jayunit100/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jayunit100/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jayunit100/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jayunit100/kubernetes/releases{/id}","created_at":"2015-01-06T12:36:29Z","updated_at":"2015-08-01T13:36:57Z","pushed_at":"2015-11-03T20:13:59Z","git_url":"git://github.com/jayunit100/kubernetes.git","ssh_url":"git@github.com:jayunit100/kubernetes.git","clone_url":"https://github.com/jayunit100/kubernetes.git","svn_url":"https://github.com/jayunit100/kubernetes","homepage":null,"size":128867,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"21a75abfbdea6bef36846dd9b9a090b3cccaaaf6","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-11-03T19:22:48Z","pushed_at":"2015-11-03T22:36:32Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":524627,"stargazers_count":11028,"watchers_count":11028,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2856,"mirror_url":null,"open_issues_count":2155,"forks":2856,"open_issues":2155,"watchers":11028,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16271"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16271"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16271/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16271/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8751b9bdf99ab94d77b5f070514b34bf2d642221"}}}}