payload: {"action":"created","comment":{"url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/comments/303304038","pull_request_review_id":261652285,"id":303304038,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMzMwNDAzOA==","diff_hunk":"@@ -0,0 +1,72 @@\n+package main\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/dragonflyoss/Dragonfly/test/command\"\n+\t\"github.com/dragonflyoss/Dragonfly/test/request\"\n+\n+\t\"github.com/go-check/check\"\n+)\n+\n+// APIMetricsSuite is the test suite for Prometheus metrics.\n+type APIMetricsSuite struct {\n+\tstarter *command.Starter\n+}\n+\n+func init() {\n+\tcheck.Suite(&APIMetricsSuite{})\n+}\n+\n+// SetUpTest does common setup in the beginning of each test.\n+func (s *APIMetricsSuite) SetUpTest(c *check.C) {","path":"test/api_metrics_test.go","position":22,"original_position":22,"commit_id":"5eff5aaab089832206e8c7a3a19f5f004857ae61","original_commit_id":"5eff5aaab089832206e8c7a3a19f5f004857ae61","user":{"login":"lowzj","id":2419214,"node_id":"MDQ6VXNlcjI0MTkyMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2419214?v=4","gravatar_id":"","url":"https://api.github.com/users/lowzj","html_url":"https://github.com/lowzj","followers_url":"https://api.github.com/users/lowzj/followers","following_url":"https://api.github.com/users/lowzj/following{/other_user}","gists_url":"https://api.github.com/users/lowzj/gists{/gist_id}","starred_url":"https://api.github.com/users/lowzj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowzj/subscriptions","organizations_url":"https://api.github.com/users/lowzj/orgs","repos_url":"https://api.github.com/users/lowzj/repos","events_url":"https://api.github.com/users/lowzj/events{/privacy}","received_events_url":"https://api.github.com/users/lowzj/received_events","type":"User","site_admin":false},"body":"`SetUpTest` -> `SetUpSuite`","created_at":"2019-07-15T06:58:58Z","updated_at":"2019-07-15T06:59:23Z","html_url":"https://github.com/dragonflyoss/Dragonfly/pull/669#discussion_r303304038","pull_request_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/comments/303304038"},"html":{"href":"https://github.com/dragonflyoss/Dragonfly/pull/669#discussion_r303304038"},"pull_request":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669"}}},"pull_request":{"url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669","id":296664584,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk2NjY0NTg0","html_url":"https://github.com/dragonflyoss/Dragonfly/pull/669","diff_url":"https://github.com/dragonflyoss/Dragonfly/pull/669.diff","patch_url":"https://github.com/dragonflyoss/Dragonfly/pull/669.patch","issue_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/669","number":669,"state":"open","locked":false,"title":"[WIP] feature: add support for prometheus metrics","user":{"login":"yeya24","id":25150124,"node_id":"MDQ6VXNlcjI1MTUwMTI0","avatar_url":"https://avatars3.githubusercontent.com/u/25150124?v=4","gravatar_id":"","url":"https://api.github.com/users/yeya24","html_url":"https://github.com/yeya24","followers_url":"https://api.github.com/users/yeya24/followers","following_url":"https://api.github.com/users/yeya24/following{/other_user}","gists_url":"https://api.github.com/users/yeya24/gists{/gist_id}","starred_url":"https://api.github.com/users/yeya24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeya24/subscriptions","organizations_url":"https://api.github.com/users/yeya24/orgs","repos_url":"https://api.github.com/users/yeya24/repos","events_url":"https://api.github.com/users/yeya24/events{/privacy}","received_events_url":"https://api.github.com/users/yeya24/received_events","type":"User","site_admin":false},"body":"Signed-off-by: yeya24 <yb532204897@gmail.com>\r\n\r\n<!-- \r\nPlease make sure you have read and understood the contributing guidelines;\r\nhttps://github.com/dragonflyoss/dragonfly/blob/master/CONTRIBUTING.md -->\r\n\r\n### Ⅰ. Describe what this PR did\r\nAdd basic support for prometheus metrics, both dfdaemon and supernode.\r\nI will add more metrics later in this PR.\r\n### Ⅱ. Does this pull request fix one issue?\r\n<!--If that, add \"fixes #xxxx\" below in the next line, for example, fixes #15. Otherwise, add \"NONE\" -->\r\nfix #197 \r\n\r\n### Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)\r\nCurrently I add one simple test in supernode router.\r\n\r\n\r\n### Ⅳ. Describe how to verify it\r\n\r\n\r\n### Ⅴ. Special notes for reviews\r\nIt is a WIP PR. I will add some docs for how to configure prometheus.\r\n\r\n","created_at":"2019-07-11T13:57:16Z","updated_at":"2019-07-15T06:59:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e44827d04bcfe84c233566bcf2fbdf1dab807329","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1111678199,"node_id":"MDU6TGFiZWwxMTExNjc4MTk5","url":"https://api.github.com/repos/dragonflyoss/Dragonfly/labels/areas/monitoring","name":"areas/monitoring","color":"123456","default":false},{"id":1101015637,"node_id":"MDU6TGFiZWwxMTAxMDE1NjM3","url":"https://api.github.com/repos/dragonflyoss/Dragonfly/labels/kind/feature","name":"kind/feature","color":"1d76db","default":false},{"id":1101000443,"node_id":"MDU6TGFiZWwxMTAxMDAwNDQz","url":"https://api.github.com/repos/dragonflyoss/Dragonfly/labels/size/XL","name":"size/XL","color":"6565d8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669/commits","review_comments_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669/comments","review_comment_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/669/comments","statuses_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/statuses/5eff5aaab089832206e8c7a3a19f5f004857ae61","head":{"label":"yeya24:feature/add-metrics","ref":"feature/add-metrics","sha":"5eff5aaab089832206e8c7a3a19f5f004857ae61","user":{"login":"yeya24","id":25150124,"node_id":"MDQ6VXNlcjI1MTUwMTI0","avatar_url":"https://avatars3.githubusercontent.com/u/25150124?v=4","gravatar_id":"","url":"https://api.github.com/users/yeya24","html_url":"https://github.com/yeya24","followers_url":"https://api.github.com/users/yeya24/followers","following_url":"https://api.github.com/users/yeya24/following{/other_user}","gists_url":"https://api.github.com/users/yeya24/gists{/gist_id}","starred_url":"https://api.github.com/users/yeya24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeya24/subscriptions","organizations_url":"https://api.github.com/users/yeya24/orgs","repos_url":"https://api.github.com/users/yeya24/repos","events_url":"https://api.github.com/users/yeya24/events{/privacy}","received_events_url":"https://api.github.com/users/yeya24/received_events","type":"User","site_admin":false},"repo":{"id":191602485,"node_id":"MDEwOlJlcG9zaXRvcnkxOTE2MDI0ODU=","name":"Dragonfly","full_name":"yeya24/Dragonfly","private":false,"owner":{"login":"yeya24","id":25150124,"node_id":"MDQ6VXNlcjI1MTUwMTI0","avatar_url":"https://avatars3.githubusercontent.com/u/25150124?v=4","gravatar_id":"","url":"https://api.github.com/users/yeya24","html_url":"https://github.com/yeya24","followers_url":"https://api.github.com/users/yeya24/followers","following_url":"https://api.github.com/users/yeya24/following{/other_user}","gists_url":"https://api.github.com/users/yeya24/gists{/gist_id}","starred_url":"https://api.github.com/users/yeya24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeya24/subscriptions","organizations_url":"https://api.github.com/users/yeya24/orgs","repos_url":"https://api.github.com/users/yeya24/repos","events_url":"https://api.github.com/users/yeya24/events{/privacy}","received_events_url":"https://api.github.com/users/yeya24/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yeya24/Dragonfly","description":"Dragonfly is an intelligent P2P based image and file distribution system.","fork":true,"url":"https://api.github.com/repos/yeya24/Dragonfly","forks_url":"https://api.github.com/repos/yeya24/Dragonfly/forks","keys_url":"https://api.github.com/repos/yeya24/Dragonfly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yeya24/Dragonfly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yeya24/Dragonfly/teams","hooks_url":"https://api.github.com/repos/yeya24/Dragonfly/hooks","issue_events_url":"https://api.github.com/repos/yeya24/Dragonfly/issues/events{/number}","events_url":"https://api.github.com/repos/yeya24/Dragonfly/events","assignees_url":"https://api.github.com/repos/yeya24/Dragonfly/assignees{/user}","branches_url":"https://api.github.com/repos/yeya24/Dragonfly/branches{/branch}","tags_url":"https://api.github.com/repos/yeya24/Dragonfly/tags","blobs_url":"https://api.github.com/repos/yeya24/Dragonfly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yeya24/Dragonfly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yeya24/Dragonfly/git/refs{/sha}","trees_url":"https://api.github.com/repos/yeya24/Dragonfly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yeya24/Dragonfly/statuses/{sha}","languages_url":"https://api.github.com/repos/yeya24/Dragonfly/languages","stargazers_url":"https://api.github.com/repos/yeya24/Dragonfly/stargazers","contributors_url":"https://api.github.com/repos/yeya24/Dragonfly/contributors","subscribers_url":"https://api.github.com/repos/yeya24/Dragonfly/subscribers","subscription_url":"https://api.github.com/repos/yeya24/Dragonfly/subscription","commits_url":"https://api.github.com/repos/yeya24/Dragonfly/commits{/sha}","git_commits_url":"https://api.github.com/repos/yeya24/Dragonfly/git/commits{/sha}","comments_url":"https://api.github.com/repos/yeya24/Dragonfly/comments{/number}","issue_comment_url":"https://api.github.com/repos/yeya24/Dragonfly/issues/comments{/number}","contents_url":"https://api.github.com/repos/yeya24/Dragonfly/contents/{+path}","compare_url":"https://api.github.com/repos/yeya24/Dragonfly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yeya24/Dragonfly/merges","archive_url":"https://api.github.com/repos/yeya24/Dragonfly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yeya24/Dragonfly/downloads","issues_url":"https://api.github.com/repos/yeya24/Dragonfly/issues{/number}","pulls_url":"https://api.github.com/repos/yeya24/Dragonfly/pulls{/number}","milestones_url":"https://api.github.com/repos/yeya24/Dragonfly/milestones{/number}","notifications_url":"https://api.github.com/repos/yeya24/Dragonfly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yeya24/Dragonfly/labels{/name}","releases_url":"https://api.github.com/repos/yeya24/Dragonfly/releases{/id}","deployments_url":"https://api.github.com/repos/yeya24/Dragonfly/deployments","created_at":"2019-06-12T15:57:03Z","updated_at":"2019-06-12T15:57:07Z","pushed_at":"2019-07-15T06:00:32Z","git_url":"git://github.com/yeya24/Dragonfly.git","ssh_url":"git@github.com:yeya24/Dragonfly.git","clone_url":"https://github.com/yeya24/Dragonfly.git","svn_url":"https://github.com/yeya24/Dragonfly","homepage":"https://d7y.io","size":20408,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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":"dragonflyoss:master","ref":"master","sha":"f7c9d031e63ab5fdb3edae4872b3bed847672745","user":{"login":"dragonflyoss","id":44993420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTkzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/44993420?v=4","gravatar_id":"","url":"https://api.github.com/users/dragonflyoss","html_url":"https://github.com/dragonflyoss","followers_url":"https://api.github.com/users/dragonflyoss/followers","following_url":"https://api.github.com/users/dragonflyoss/following{/other_user}","gists_url":"https://api.github.com/users/dragonflyoss/gists{/gist_id}","starred_url":"https://api.github.com/users/dragonflyoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragonflyoss/subscriptions","organizations_url":"https://api.github.com/users/dragonflyoss/orgs","repos_url":"https://api.github.com/users/dragonflyoss/repos","events_url":"https://api.github.com/users/dragonflyoss/events{/privacy}","received_events_url":"https://api.github.com/users/dragonflyoss/received_events","type":"Organization","site_admin":false},"repo":{"id":110776471,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA3NzY0NzE=","name":"Dragonfly","full_name":"dragonflyoss/Dragonfly","private":false,"owner":{"login":"dragonflyoss","id":44993420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTkzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/44993420?v=4","gravatar_id":"","url":"https://api.github.com/users/dragonflyoss","html_url":"https://github.com/dragonflyoss","followers_url":"https://api.github.com/users/dragonflyoss/followers","following_url":"https://api.github.com/users/dragonflyoss/following{/other_user}","gists_url":"https://api.github.com/users/dragonflyoss/gists{/gist_id}","starred_url":"https://api.github.com/users/dragonflyoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragonflyoss/subscriptions","organizations_url":"https://api.github.com/users/dragonflyoss/orgs","repos_url":"https://api.github.com/users/dragonflyoss/repos","events_url":"https://api.github.com/users/dragonflyoss/events{/privacy}","received_events_url":"https://api.github.com/users/dragonflyoss/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dragonflyoss/Dragonfly","description":"Dragonfly is an intelligent P2P based image and file distribution system.","fork":false,"url":"https://api.github.com/repos/dragonflyoss/Dragonfly","forks_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/forks","keys_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/teams","hooks_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/hooks","issue_events_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/events{/number}","events_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/events","assignees_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/assignees{/user}","branches_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/branches{/branch}","tags_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/tags","blobs_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/git/refs{/sha}","trees_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/statuses/{sha}","languages_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/languages","stargazers_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/stargazers","contributors_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/contributors","subscribers_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/subscribers","subscription_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/subscription","commits_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/commits{/sha}","git_commits_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/git/commits{/sha}","comments_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/comments{/number}","issue_comment_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/comments{/number}","contents_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/contents/{+path}","compare_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/merges","archive_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/downloads","issues_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues{/number}","pulls_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls{/number}","milestones_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/milestones{/number}","notifications_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/labels{/name}","releases_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/releases{/id}","deployments_url":"https://api.github.com/repos/dragonflyoss/Dragonfly/deployments","created_at":"2017-11-15T03:05:27Z","updated_at":"2019-07-13T20:42:12Z","pushed_at":"2019-07-15T06:00:34Z","git_url":"git://github.com/dragonflyoss/Dragonfly.git","ssh_url":"git@github.com:dragonflyoss/Dragonfly.git","clone_url":"https://github.com/dragonflyoss/Dragonfly.git","svn_url":"https://github.com/dragonflyoss/Dragonfly","homepage":"https://d7y.io","size":20300,"stargazers_count":3870,"watchers_count":3870,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":477,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":50,"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":477,"open_issues":50,"watchers":3870,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669"},"html":{"href":"https://github.com/dragonflyoss/Dragonfly/pull/669"},"issue":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/669"},"comments":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/issues/669/comments"},"review_comments":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669/comments"},"review_comment":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/pulls/669/commits"},"statuses":{"href":"https://api.github.com/repos/dragonflyoss/Dragonfly/statuses/5eff5aaab089832206e8c7a3a19f5f004857ae61"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"lowzj"}}