{"action":"created","comment":{"url":"https://api.github.com/repos/knative/serving/pulls/comments/236979516","pull_request_review_id":179163817,"id":236979516,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjk3OTUxNg==","diff_hunk":"@@ -91,6 +95,12 @@ func initEnv() {\n \n \t// TODO(mattmoor): Move this key to be in terms of the KPA.\n \tservingRevisionKey = autoscaler.NewKpaKey(servingNamespace, servingRevision)\n+\thealth = &healthServer{alive: true}\n+\t_reporter, err := queue.NewStatsReporter(servingNamespace, servingConfig, servingRevision)\n+\tif err != nil {\n+\t\tlogger.Fatal(\"Failed to create stats reporter\", zap.Error(err))\n+\t}\n+\treporter = _reporter","path":"cmd/queue/main.go","position":44,"original_position":44,"commit_id":"e2bf7884efe3e7284e67815c756ea228a1503295","original_commit_id":"e2bf7884efe3e7284e67815c756ea228a1503295","user":{"login":"markusthoemmes","id":1289147,"node_id":"MDQ6VXNlcjEyODkxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1289147?v=4","gravatar_id":"","url":"https://api.github.com/users/markusthoemmes","html_url":"https://github.com/markusthoemmes","followers_url":"https://api.github.com/users/markusthoemmes/followers","following_url":"https://api.github.com/users/markusthoemmes/following{/other_user}","gists_url":"https://api.github.com/users/markusthoemmes/gists{/gist_id}","starred_url":"https://api.github.com/users/markusthoemmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusthoemmes/subscriptions","organizations_url":"https://api.github.com/users/markusthoemmes/orgs","repos_url":"https://api.github.com/users/markusthoemmes/repos","events_url":"https://api.github.com/users/markusthoemmes/events{/privacy}","received_events_url":"https://api.github.com/users/markusthoemmes/received_events","type":"User","site_admin":false},"body":"Should this be moved down into main, closer to the initialization of the exporter endpoint, to have it all packed in one place?\r\n\r\nI think the `initEnv` function is supposed to read environment values into globals.","created_at":"2018-11-28T08:24:40Z","updated_at":"2018-11-28T08:37:58Z","html_url":"https://github.com/knative/serving/pull/2358#discussion_r236979516","pull_request_url":"https://api.github.com/repos/knative/serving/pulls/2358","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/knative/serving/pulls/comments/236979516"},"html":{"href":"https://github.com/knative/serving/pull/2358#discussion_r236979516"},"pull_request":{"href":"https://api.github.com/repos/knative/serving/pulls/2358"}}},"pull_request":{"url":"https://api.github.com/repos/knative/serving/pulls/2358","id":227147214,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MTQ3MjE0","html_url":"https://github.com/knative/serving/pull/2358","diff_url":"https://github.com/knative/serving/pull/2358.diff","patch_url":"https://github.com/knative/serving/pull/2358.patch","issue_url":"https://api.github.com/repos/knative/serving/issues/2358","number":2358,"state":"open","locked":false,"title":"Queue Prometheous Exporter","user":{"login":"mrmcmuffinz","id":19247363,"node_id":"MDQ6VXNlcjE5MjQ3MzYz","avatar_url":"https://avatars2.githubusercontent.com/u/19247363?v=4","gravatar_id":"","url":"https://api.github.com/users/mrmcmuffinz","html_url":"https://github.com/mrmcmuffinz","followers_url":"https://api.github.com/users/mrmcmuffinz/followers","following_url":"https://api.github.com/users/mrmcmuffinz/following{/other_user}","gists_url":"https://api.github.com/users/mrmcmuffinz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmcmuffinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmcmuffinz/subscriptions","organizations_url":"https://api.github.com/users/mrmcmuffinz/orgs","repos_url":"https://api.github.com/users/mrmcmuffinz/repos","events_url":"https://api.github.com/users/mrmcmuffinz/events{/privacy}","received_events_url":"https://api.github.com/users/mrmcmuffinz/received_events","type":"User","site_admin":false},"body":"<!--\r\nRequest Prow to automatically lint any go code in this PR:\r\n\r\n/lint\r\n-->\r\n\r\nFixes #2202.\r\n\r\nProposed Changes:\r\n--------------------\r\nAdding prometheus metrics exporter.\r\n\r\n\r\n```\r\ncurl -i -XGET 172.30.6.243:9090/metrics\r\nHTTP/1.1 200 OK\r\nContent-Length: 817\r\nContent-Type: text/plain; version=0.0.4\r\nDate: Tue, 20 Nov 2018 02:12:03 GMT\r\n\r\n# HELP queue_average_concurrent_requests Number of requests currently being handled by this pod\r\n# TYPE queue_average_concurrent_requests gauge\r\nqueue_average_concurrent_requests{destination_configuration=\"helloworld-go\",destination_namespace=\"default\",destination_revision=\"helloworld-go-00001\"} 0\r\n# HELP queue_lame_duck Indicates this Pod has received a shutdown signal with 1 else 0\r\n# TYPE queue_lame_duck gauge\r\nqueue_lame_duck{destination_configuration=\"helloworld-go\",destination_namespace=\"default\",destination_revision=\"helloworld-go-00001\"} 0\r\n# HELP queue_operations_per_second Number of requests received since last Stat\r\n# TYPE queue_operations_per_second gauge\r\nqueue_operations_per_second{destination_configuration=\"helloworld-go\",destination_namespace=\"default\",destination_revision=\"helloworld-go-00001\"} 0\r\n```\r\n","created_at":"2018-10-31T03:22:54Z","updated_at":"2018-11-28T08:37:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f64c66edf8d7a714a7308c19ae8e7a89b7669e2","assignee":{"login":"josephburnett","id":1103629,"node_id":"MDQ6VXNlcjExMDM2Mjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1103629?v=4","gravatar_id":"","url":"https://api.github.com/users/josephburnett","html_url":"https://github.com/josephburnett","followers_url":"https://api.github.com/users/josephburnett/followers","following_url":"https://api.github.com/users/josephburnett/following{/other_user}","gists_url":"https://api.github.com/users/josephburnett/gists{/gist_id}","starred_url":"https://api.github.com/users/josephburnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephburnett/subscriptions","organizations_url":"https://api.github.com/users/josephburnett/orgs","repos_url":"https://api.github.com/users/josephburnett/repos","events_url":"https://api.github.com/users/josephburnett/events{/privacy}","received_events_url":"https://api.github.com/users/josephburnett/received_events","type":"User","site_admin":false},"assignees":[{"login":"josephburnett","id":1103629,"node_id":"MDQ6VXNlcjExMDM2Mjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1103629?v=4","gravatar_id":"","url":"https://api.github.com/users/josephburnett","html_url":"https://github.com/josephburnett","followers_url":"https://api.github.com/users/josephburnett/followers","following_url":"https://api.github.com/users/josephburnett/following{/other_user}","gists_url":"https://api.github.com/users/josephburnett/gists{/gist_id}","starred_url":"https://api.github.com/users/josephburnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephburnett/subscriptions","organizations_url":"https://api.github.com/users/josephburnett/orgs","repos_url":"https://api.github.com/users/josephburnett/repos","events_url":"https://api.github.com/users/josephburnett/events{/privacy}","received_events_url":"https://api.github.com/users/josephburnett/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mattmoor","id":2442466,"node_id":"MDQ6VXNlcjI0NDI0NjY=","avatar_url":"https://avatars3.githubusercontent.com/u/2442466?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmoor","html_url":"https://github.com/mattmoor","followers_url":"https://api.github.com/users/mattmoor/followers","following_url":"https://api.github.com/users/mattmoor/following{/other_user}","gists_url":"https://api.github.com/users/mattmoor/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmoor/subscriptions","organizations_url":"https://api.github.com/users/mattmoor/orgs","repos_url":"https://api.github.com/users/mattmoor/repos","events_url":"https://api.github.com/users/mattmoor/events{/privacy}","received_events_url":"https://api.github.com/users/mattmoor/received_events","type":"User","site_admin":false},{"login":"mdemirhan","id":4033879,"node_id":"MDQ6VXNlcjQwMzM4Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/4033879?v=4","gravatar_id":"","url":"https://api.github.com/users/mdemirhan","html_url":"https://github.com/mdemirhan","followers_url":"https://api.github.com/users/mdemirhan/followers","following_url":"https://api.github.com/users/mdemirhan/following{/other_user}","gists_url":"https://api.github.com/users/mdemirhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mdemirhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdemirhan/subscriptions","organizations_url":"https://api.github.com/users/mdemirhan/orgs","repos_url":"https://api.github.com/users/mdemirhan/repos","events_url":"https://api.github.com/users/mdemirhan/events{/privacy}","received_events_url":"https://api.github.com/users/mdemirhan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1003590441,"node_id":"MDU6TGFiZWwxMDAzNTkwNDQx","url":"https://api.github.com/repos/knative/serving/labels/needs-ok-to-test","name":"needs-ok-to-test","color":"ededed","default":false},{"id":859757660,"node_id":"MDU6TGFiZWw4NTk3NTc2NjA=","url":"https://api.github.com/repos/knative/serving/labels/size/L","name":"size/L","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/knative/serving/pulls/2358/commits","review_comments_url":"https://api.github.com/repos/knative/serving/pulls/2358/comments","review_comment_url":"https://api.github.com/repos/knative/serving/pulls/comments{/number}","comments_url":"https://api.github.com/repos/knative/serving/issues/2358/comments","statuses_url":"https://api.github.com/repos/knative/serving/statuses/e2bf7884efe3e7284e67815c756ea228a1503295","head":{"label":"mrmcmuffinz:queue-prom-exp-2202","ref":"queue-prom-exp-2202","sha":"e2bf7884efe3e7284e67815c756ea228a1503295","user":{"login":"mrmcmuffinz","id":19247363,"node_id":"MDQ6VXNlcjE5MjQ3MzYz","avatar_url":"https://avatars2.githubusercontent.com/u/19247363?v=4","gravatar_id":"","url":"https://api.github.com/users/mrmcmuffinz","html_url":"https://github.com/mrmcmuffinz","followers_url":"https://api.github.com/users/mrmcmuffinz/followers","following_url":"https://api.github.com/users/mrmcmuffinz/following{/other_user}","gists_url":"https://api.github.com/users/mrmcmuffinz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmcmuffinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmcmuffinz/subscriptions","organizations_url":"https://api.github.com/users/mrmcmuffinz/orgs","repos_url":"https://api.github.com/users/mrmcmuffinz/repos","events_url":"https://api.github.com/users/mrmcmuffinz/events{/privacy}","received_events_url":"https://api.github.com/users/mrmcmuffinz/received_events","type":"User","site_admin":false},"repo":{"id":153948138,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM5NDgxMzg=","name":"serving","full_name":"mrmcmuffinz/serving","private":false,"owner":{"login":"mrmcmuffinz","id":19247363,"node_id":"MDQ6VXNlcjE5MjQ3MzYz","avatar_url":"https://avatars2.githubusercontent.com/u/19247363?v=4","gravatar_id":"","url":"https://api.github.com/users/mrmcmuffinz","html_url":"https://github.com/mrmcmuffinz","followers_url":"https://api.github.com/users/mrmcmuffinz/followers","following_url":"https://api.github.com/users/mrmcmuffinz/following{/other_user}","gists_url":"https://api.github.com/users/mrmcmuffinz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmcmuffinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmcmuffinz/subscriptions","organizations_url":"https://api.github.com/users/mrmcmuffinz/orgs","repos_url":"https://api.github.com/users/mrmcmuffinz/repos","events_url":"https://api.github.com/users/mrmcmuffinz/events{/privacy}","received_events_url":"https://api.github.com/users/mrmcmuffinz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mrmcmuffinz/serving","description":"Kubernetes-based, scale-to-zero, request-driven compute","fork":true,"url":"https://api.github.com/repos/mrmcmuffinz/serving","forks_url":"https://api.github.com/repos/mrmcmuffinz/serving/forks","keys_url":"https://api.github.com/repos/mrmcmuffinz/serving/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrmcmuffinz/serving/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrmcmuffinz/serving/teams","hooks_url":"https://api.github.com/repos/mrmcmuffinz/serving/hooks","issue_events_url":"https://api.github.com/repos/mrmcmuffinz/serving/issues/events{/number}","events_url":"https://api.github.com/repos/mrmcmuffinz/serving/events","assignees_url":"https://api.github.com/repos/mrmcmuffinz/serving/assignees{/user}","branches_url":"https://api.github.com/repos/mrmcmuffinz/serving/branches{/branch}","tags_url":"https://api.github.com/repos/mrmcmuffinz/serving/tags","blobs_url":"https://api.github.com/repos/mrmcmuffinz/serving/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrmcmuffinz/serving/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrmcmuffinz/serving/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrmcmuffinz/serving/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrmcmuffinz/serving/statuses/{sha}","languages_url":"https://api.github.com/repos/mrmcmuffinz/serving/languages","stargazers_url":"https://api.github.com/repos/mrmcmuffinz/serving/stargazers","contributors_url":"https://api.github.com/repos/mrmcmuffinz/serving/contributors","subscribers_url":"https://api.github.com/repos/mrmcmuffinz/serving/subscribers","subscription_url":"https://api.github.com/repos/mrmcmuffinz/serving/subscription","commits_url":"https://api.github.com/repos/mrmcmuffinz/serving/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrmcmuffinz/serving/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrmcmuffinz/serving/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrmcmuffinz/serving/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrmcmuffinz/serving/contents/{+path}","compare_url":"https://api.github.com/repos/mrmcmuffinz/serving/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrmcmuffinz/serving/merges","archive_url":"https://api.github.com/repos/mrmcmuffinz/serving/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrmcmuffinz/serving/downloads","issues_url":"https://api.github.com/repos/mrmcmuffinz/serving/issues{/number}","pulls_url":"https://api.github.com/repos/mrmcmuffinz/serving/pulls{/number}","milestones_url":"https://api.github.com/repos/mrmcmuffinz/serving/milestones{/number}","notifications_url":"https://api.github.com/repos/mrmcmuffinz/serving/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrmcmuffinz/serving/labels{/name}","releases_url":"https://api.github.com/repos/mrmcmuffinz/serving/releases{/id}","deployments_url":"https://api.github.com/repos/mrmcmuffinz/serving/deployments","created_at":"2018-10-20T21:03:11Z","updated_at":"2018-11-14T18:06:19Z","pushed_at":"2018-11-28T03:08:54Z","git_url":"git://github.com/mrmcmuffinz/serving.git","ssh_url":"git@github.com:mrmcmuffinz/serving.git","clone_url":"https://github.com/mrmcmuffinz/serving.git","svn_url":"https://github.com/mrmcmuffinz/serving","homepage":"","size":29563,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"knative:master","ref":"master","sha":"35454803c7fa1e55744c496e9c62f579922dbcf9","user":{"login":"knative","id":35583233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NTgzMjMz","avatar_url":"https://avatars2.githubusercontent.com/u/35583233?v=4","gravatar_id":"","url":"https://api.github.com/users/knative","html_url":"https://github.com/knative","followers_url":"https://api.github.com/users/knative/followers","following_url":"https://api.github.com/users/knative/following{/other_user}","gists_url":"https://api.github.com/users/knative/gists{/gist_id}","starred_url":"https://api.github.com/users/knative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knative/subscriptions","organizations_url":"https://api.github.com/users/knative/orgs","repos_url":"https://api.github.com/users/knative/repos","events_url":"https://api.github.com/users/knative/events{/privacy}","received_events_url":"https://api.github.com/users/knative/received_events","type":"Organization","site_admin":false},"repo":{"id":118828329,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg4MjgzMjk=","name":"serving","full_name":"knative/serving","private":false,"owner":{"login":"knative","id":35583233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NTgzMjMz","avatar_url":"https://avatars2.githubusercontent.com/u/35583233?v=4","gravatar_id":"","url":"https://api.github.com/users/knative","html_url":"https://github.com/knative","followers_url":"https://api.github.com/users/knative/followers","following_url":"https://api.github.com/users/knative/following{/other_user}","gists_url":"https://api.github.com/users/knative/gists{/gist_id}","starred_url":"https://api.github.com/users/knative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knative/subscriptions","organizations_url":"https://api.github.com/users/knative/orgs","repos_url":"https://api.github.com/users/knative/repos","events_url":"https://api.github.com/users/knative/events{/privacy}","received_events_url":"https://api.github.com/users/knative/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/knative/serving","description":"Kubernetes-based, scale-to-zero, request-driven compute","fork":false,"url":"https://api.github.com/repos/knative/serving","forks_url":"https://api.github.com/repos/knative/serving/forks","keys_url":"https://api.github.com/repos/knative/serving/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knative/serving/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knative/serving/teams","hooks_url":"https://api.github.com/repos/knative/serving/hooks","issue_events_url":"https://api.github.com/repos/knative/serving/issues/events{/number}","events_url":"https://api.github.com/repos/knative/serving/events","assignees_url":"https://api.github.com/repos/knative/serving/assignees{/user}","branches_url":"https://api.github.com/repos/knative/serving/branches{/branch}","tags_url":"https://api.github.com/repos/knative/serving/tags","blobs_url":"https://api.github.com/repos/knative/serving/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knative/serving/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knative/serving/git/refs{/sha}","trees_url":"https://api.github.com/repos/knative/serving/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knative/serving/statuses/{sha}","languages_url":"https://api.github.com/repos/knative/serving/languages","stargazers_url":"https://api.github.com/repos/knative/serving/stargazers","contributors_url":"https://api.github.com/repos/knative/serving/contributors","subscribers_url":"https://api.github.com/repos/knative/serving/subscribers","subscription_url":"https://api.github.com/repos/knative/serving/subscription","commits_url":"https://api.github.com/repos/knative/serving/commits{/sha}","git_commits_url":"https://api.github.com/repos/knative/serving/git/commits{/sha}","comments_url":"https://api.github.com/repos/knative/serving/comments{/number}","issue_comment_url":"https://api.github.com/repos/knative/serving/issues/comments{/number}","contents_url":"https://api.github.com/repos/knative/serving/contents/{+path}","compare_url":"https://api.github.com/repos/knative/serving/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knative/serving/merges","archive_url":"https://api.github.com/repos/knative/serving/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knative/serving/downloads","issues_url":"https://api.github.com/repos/knative/serving/issues{/number}","pulls_url":"https://api.github.com/repos/knative/serving/pulls{/number}","milestones_url":"https://api.github.com/repos/knative/serving/milestones{/number}","notifications_url":"https://api.github.com/repos/knative/serving/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knative/serving/labels{/name}","releases_url":"https://api.github.com/repos/knative/serving/releases{/id}","deployments_url":"https://api.github.com/repos/knative/serving/deployments","created_at":"2018-01-24T22:07:44Z","updated_at":"2018-11-28T06:43:38Z","pushed_at":"2018-11-28T07:52:41Z","git_url":"git://github.com/knative/serving.git","ssh_url":"git@github.com:knative/serving.git","clone_url":"https://github.com/knative/serving.git","svn_url":"https://github.com/knative/serving","homepage":"","size":29521,"stargazers_count":887,"watchers_count":887,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":184,"mirror_url":null,"archived":false,"open_issues_count":278,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":184,"open_issues":278,"watchers":887,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/knative/serving/pulls/2358"},"html":{"href":"https://github.com/knative/serving/pull/2358"},"issue":{"href":"https://api.github.com/repos/knative/serving/issues/2358"},"comments":{"href":"https://api.github.com/repos/knative/serving/issues/2358/comments"},"review_comments":{"href":"https://api.github.com/repos/knative/serving/pulls/2358/comments"},"review_comment":{"href":"https://api.github.com/repos/knative/serving/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/knative/serving/pulls/2358/commits"},"statuses":{"href":"https://api.github.com/repos/knative/serving/statuses/e2bf7884efe3e7284e67815c756ea228a1503295"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"markusthoemmes"}}