{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/flux/pulls/comments/92377544","pull_request_review_id":12890776,"id":92377544,"diff_hunk":"@@ -79,6 +89,24 @@ func (a *Daemon) connect() error {\n \t}()\n \ta.logger.Log(\"connected\", true)\n \n+\t// Instrument connection lifespan\n+\tconnectedAt := time.Now()\n+\tdisconnected := make(chan struct{})\n+\tdefer close(disconnected)\n+\tgo func() {\n+\t\tt := time.NewTicker(1 * time.Second)\n+\t\tfor {\n+\t\t\tselect {\n+\t\t\tcase now := <-t.C:\n+\t\t\t\ta.setConnectionDuration(now.Sub(connectedAt).Seconds())","path":"http/daemon.go","position":62,"original_position":62,"commit_id":"6b5bf79cd13eccb82643cc27f0c38458e29619ca","original_commit_id":"6b5bf79cd13eccb82643cc27f0c38458e29619ca","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"body":"good queestion. I assumed the ticker values would be less skewed... will check.","created_at":"2016-12-14T11:50:51Z","updated_at":"2016-12-14T11:50:51Z","html_url":"https://github.com/weaveworks/flux/pull/308#discussion_r92377544","pull_request_url":"https://api.github.com/repos/weaveworks/flux/pulls/308","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/comments/92377544"},"html":{"href":"https://github.com/weaveworks/flux/pull/308#discussion_r92377544"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/308"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/flux/pulls/308","id":97794314,"html_url":"https://github.com/weaveworks/flux/pull/308","diff_url":"https://github.com/weaveworks/flux/pull/308.diff","patch_url":"https://github.com/weaveworks/flux/pull/308.patch","issue_url":"https://api.github.com/repos/weaveworks/flux/issues/308","number":308,"state":"open","locked":false,"title":"Add prom metrics on platforms (both fluxd and fluxsvc)","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"body":"First part of #297","created_at":"2016-12-13T17:10:23Z","updated_at":"2016-12-14T11:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ad86b823d4563af967a5d5745ff04895c5e57a0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/flux/pulls/308/commits","review_comments_url":"https://api.github.com/repos/weaveworks/flux/pulls/308/comments","review_comment_url":"https://api.github.com/repos/weaveworks/flux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/flux/issues/308/comments","statuses_url":"https://api.github.com/repos/weaveworks/flux/statuses/6b5bf79cd13eccb82643cc27f0c38458e29619ca","head":{"label":"weaveworks:297-fluxd-monitoring","ref":"297-fluxd-monitoring","sha":"6b5bf79cd13eccb82643cc27f0c38458e29619ca","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":62799996,"name":"flux","full_name":"weaveworks/flux","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/flux","description":"A tool for turning container images into running Kubernetes services","fork":false,"url":"https://api.github.com/repos/weaveworks/flux","forks_url":"https://api.github.com/repos/weaveworks/flux/forks","keys_url":"https://api.github.com/repos/weaveworks/flux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/flux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/flux/teams","hooks_url":"https://api.github.com/repos/weaveworks/flux/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/flux/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/flux/events","assignees_url":"https://api.github.com/repos/weaveworks/flux/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/flux/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/flux/tags","blobs_url":"https://api.github.com/repos/weaveworks/flux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/flux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/flux/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/flux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/flux/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/flux/languages","stargazers_url":"https://api.github.com/repos/weaveworks/flux/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/flux/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/flux/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/flux/subscription","commits_url":"https://api.github.com/repos/weaveworks/flux/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/flux/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/flux/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/flux/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/flux/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/flux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/flux/merges","archive_url":"https://api.github.com/repos/weaveworks/flux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/flux/downloads","issues_url":"https://api.github.com/repos/weaveworks/flux/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/flux/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/flux/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/flux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/flux/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/flux/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/flux/deployments","created_at":"2016-07-07T10:55:13Z","updated_at":"2016-12-11T13:06:32Z","pushed_at":"2016-12-14T09:29:58Z","git_url":"git://github.com/weaveworks/flux.git","ssh_url":"git@github.com:weaveworks/flux.git","clone_url":"https://github.com/weaveworks/flux.git","svn_url":"https://github.com/weaveworks/flux","homepage":"","size":3716,"stargazers_count":12,"watchers_count":12,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":74,"forks":1,"open_issues":74,"watchers":12,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"93c412f0e16668d9bdce76e560b71ebbd85741f5","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":62799996,"name":"flux","full_name":"weaveworks/flux","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/flux","description":"A tool for turning container images into running Kubernetes services","fork":false,"url":"https://api.github.com/repos/weaveworks/flux","forks_url":"https://api.github.com/repos/weaveworks/flux/forks","keys_url":"https://api.github.com/repos/weaveworks/flux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/flux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/flux/teams","hooks_url":"https://api.github.com/repos/weaveworks/flux/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/flux/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/flux/events","assignees_url":"https://api.github.com/repos/weaveworks/flux/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/flux/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/flux/tags","blobs_url":"https://api.github.com/repos/weaveworks/flux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/flux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/flux/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/flux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/flux/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/flux/languages","stargazers_url":"https://api.github.com/repos/weaveworks/flux/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/flux/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/flux/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/flux/subscription","commits_url":"https://api.github.com/repos/weaveworks/flux/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/flux/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/flux/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/flux/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/flux/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/flux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/flux/merges","archive_url":"https://api.github.com/repos/weaveworks/flux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/flux/downloads","issues_url":"https://api.github.com/repos/weaveworks/flux/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/flux/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/flux/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/flux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/flux/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/flux/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/flux/deployments","created_at":"2016-07-07T10:55:13Z","updated_at":"2016-12-11T13:06:32Z","pushed_at":"2016-12-14T09:29:58Z","git_url":"git://github.com/weaveworks/flux.git","ssh_url":"git@github.com:weaveworks/flux.git","clone_url":"https://github.com/weaveworks/flux.git","svn_url":"https://github.com/weaveworks/flux","homepage":"","size":3716,"stargazers_count":12,"watchers_count":12,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":74,"forks":1,"open_issues":74,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/308"},"html":{"href":"https://github.com/weaveworks/flux/pull/308"},"issue":{"href":"https://api.github.com/repos/weaveworks/flux/issues/308"},"comments":{"href":"https://api.github.com/repos/weaveworks/flux/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/flux/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/flux/statuses/6b5bf79cd13eccb82643cc27f0c38458e29619ca"}}}}
{"actor":{"display_login":"paulbellamy"}}