{"action":"created","comment":{"url":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments/186340601","pull_request_review_id":117898312,"id":186340601,"diff_hunk":"@@ -246,6 +251,9 @@ func (b *metricBucket) Upload(ctx context.Context, name string, r io.Reader) err\n \terr := b.bkt.Upload(ctx, name, r)\n \tif err != nil {\n \t\tb.opsFailures.WithLabelValues(op).Inc()\n+\t} else {\n+\t\t//TODO: Use SetToCurrentTime() once we update the Prometheus client_golang\n+\t\tb.lastSuccessfullUploadTime.Set(float64(time.Now().UnixNano()) / 1e9)","path":"pkg/objstore/objstore.go","position":35,"original_position":35,"commit_id":"3fbe91ad03eb382e5a5b2b7ea3acec914c8df810","original_commit_id":"3fbe91ad03eb382e5a5b2b7ea3acec914c8df810","user":{"login":"alvaroaleman","id":6496100,"avatar_url":"https://avatars2.githubusercontent.com/u/6496100?v=4","gravatar_id":"","url":"https://api.github.com/users/alvaroaleman","html_url":"https://github.com/alvaroaleman","followers_url":"https://api.github.com/users/alvaroaleman/followers","following_url":"https://api.github.com/users/alvaroaleman/following{/other_user}","gists_url":"https://api.github.com/users/alvaroaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaroaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaroaleman/subscriptions","organizations_url":"https://api.github.com/users/alvaroaleman/orgs","repos_url":"https://api.github.com/users/alvaroaleman/repos","events_url":"https://api.github.com/users/alvaroaleman/events{/privacy}","received_events_url":"https://api.github.com/users/alvaroaleman/received_events","type":"User","site_admin":false},"body":"Because this is [how its done in the prometheus client_golang](https://github.com/prometheus/client_golang/blob/master/prometheus/gauge.go#L99)","created_at":"2018-05-07T06:59:09Z","updated_at":"2018-05-07T06:59:09Z","html_url":"https://github.com/improbable-eng/thanos/pull/324#discussion_r186340601","pull_request_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/324","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments/186340601"},"html":{"href":"https://github.com/improbable-eng/thanos/pull/324#discussion_r186340601"},"pull_request":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/324"}},"in_reply_to_id":186303181},"pull_request":{"url":"https://api.github.com/repos/improbable-eng/thanos/pulls/324","id":186226120,"html_url":"https://github.com/improbable-eng/thanos/pull/324","diff_url":"https://github.com/improbable-eng/thanos/pull/324.diff","patch_url":"https://github.com/improbable-eng/thanos/pull/324.patch","issue_url":"https://api.github.com/repos/improbable-eng/thanos/issues/324","number":324,"state":"open","locked":false,"title":"Add metric for last successful bucket upload timestamp","user":{"login":"alvaroaleman","id":6496100,"avatar_url":"https://avatars2.githubusercontent.com/u/6496100?v=4","gravatar_id":"","url":"https://api.github.com/users/alvaroaleman","html_url":"https://github.com/alvaroaleman","followers_url":"https://api.github.com/users/alvaroaleman/followers","following_url":"https://api.github.com/users/alvaroaleman/following{/other_user}","gists_url":"https://api.github.com/users/alvaroaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaroaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaroaleman/subscriptions","organizations_url":"https://api.github.com/users/alvaroaleman/orgs","repos_url":"https://api.github.com/users/alvaroaleman/repos","events_url":"https://api.github.com/users/alvaroaleman/events{/privacy}","received_events_url":"https://api.github.com/users/alvaroaleman/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-06T20:58:03Z","updated_at":"2018-05-07T06:59:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04a922f7ecf5c439fd4eba25041a41b4430618fd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/324/commits","review_comments_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/324/comments","review_comment_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/improbable-eng/thanos/issues/324/comments","statuses_url":"https://api.github.com/repos/improbable-eng/thanos/statuses/3fbe91ad03eb382e5a5b2b7ea3acec914c8df810","head":{"label":"alvaroaleman:upload-metric","ref":"upload-metric","sha":"3fbe91ad03eb382e5a5b2b7ea3acec914c8df810","user":{"login":"alvaroaleman","id":6496100,"avatar_url":"https://avatars2.githubusercontent.com/u/6496100?v=4","gravatar_id":"","url":"https://api.github.com/users/alvaroaleman","html_url":"https://github.com/alvaroaleman","followers_url":"https://api.github.com/users/alvaroaleman/followers","following_url":"https://api.github.com/users/alvaroaleman/following{/other_user}","gists_url":"https://api.github.com/users/alvaroaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaroaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaroaleman/subscriptions","organizations_url":"https://api.github.com/users/alvaroaleman/orgs","repos_url":"https://api.github.com/users/alvaroaleman/repos","events_url":"https://api.github.com/users/alvaroaleman/events{/privacy}","received_events_url":"https://api.github.com/users/alvaroaleman/received_events","type":"User","site_admin":false},"repo":{"id":128642778,"name":"thanos","full_name":"alvaroaleman/thanos","owner":{"login":"alvaroaleman","id":6496100,"avatar_url":"https://avatars2.githubusercontent.com/u/6496100?v=4","gravatar_id":"","url":"https://api.github.com/users/alvaroaleman","html_url":"https://github.com/alvaroaleman","followers_url":"https://api.github.com/users/alvaroaleman/followers","following_url":"https://api.github.com/users/alvaroaleman/following{/other_user}","gists_url":"https://api.github.com/users/alvaroaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaroaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaroaleman/subscriptions","organizations_url":"https://api.github.com/users/alvaroaleman/orgs","repos_url":"https://api.github.com/users/alvaroaleman/repos","events_url":"https://api.github.com/users/alvaroaleman/events{/privacy}","received_events_url":"https://api.github.com/users/alvaroaleman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alvaroaleman/thanos","description":"Highly available Prometheus setup with long term storage capabilities.","fork":true,"url":"https://api.github.com/repos/alvaroaleman/thanos","forks_url":"https://api.github.com/repos/alvaroaleman/thanos/forks","keys_url":"https://api.github.com/repos/alvaroaleman/thanos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alvaroaleman/thanos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alvaroaleman/thanos/teams","hooks_url":"https://api.github.com/repos/alvaroaleman/thanos/hooks","issue_events_url":"https://api.github.com/repos/alvaroaleman/thanos/issues/events{/number}","events_url":"https://api.github.com/repos/alvaroaleman/thanos/events","assignees_url":"https://api.github.com/repos/alvaroaleman/thanos/assignees{/user}","branches_url":"https://api.github.com/repos/alvaroaleman/thanos/branches{/branch}","tags_url":"https://api.github.com/repos/alvaroaleman/thanos/tags","blobs_url":"https://api.github.com/repos/alvaroaleman/thanos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alvaroaleman/thanos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alvaroaleman/thanos/git/refs{/sha}","trees_url":"https://api.github.com/repos/alvaroaleman/thanos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alvaroaleman/thanos/statuses/{sha}","languages_url":"https://api.github.com/repos/alvaroaleman/thanos/languages","stargazers_url":"https://api.github.com/repos/alvaroaleman/thanos/stargazers","contributors_url":"https://api.github.com/repos/alvaroaleman/thanos/contributors","subscribers_url":"https://api.github.com/repos/alvaroaleman/thanos/subscribers","subscription_url":"https://api.github.com/repos/alvaroaleman/thanos/subscription","commits_url":"https://api.github.com/repos/alvaroaleman/thanos/commits{/sha}","git_commits_url":"https://api.github.com/repos/alvaroaleman/thanos/git/commits{/sha}","comments_url":"https://api.github.com/repos/alvaroaleman/thanos/comments{/number}","issue_comment_url":"https://api.github.com/repos/alvaroaleman/thanos/issues/comments{/number}","contents_url":"https://api.github.com/repos/alvaroaleman/thanos/contents/{+path}","compare_url":"https://api.github.com/repos/alvaroaleman/thanos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alvaroaleman/thanos/merges","archive_url":"https://api.github.com/repos/alvaroaleman/thanos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alvaroaleman/thanos/downloads","issues_url":"https://api.github.com/repos/alvaroaleman/thanos/issues{/number}","pulls_url":"https://api.github.com/repos/alvaroaleman/thanos/pulls{/number}","milestones_url":"https://api.github.com/repos/alvaroaleman/thanos/milestones{/number}","notifications_url":"https://api.github.com/repos/alvaroaleman/thanos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alvaroaleman/thanos/labels{/name}","releases_url":"https://api.github.com/repos/alvaroaleman/thanos/releases{/id}","deployments_url":"https://api.github.com/repos/alvaroaleman/thanos/deployments","created_at":"2018-04-08T13:13:47Z","updated_at":"2018-04-08T13:13:50Z","pushed_at":"2018-05-06T20:50:09Z","git_url":"git://github.com/alvaroaleman/thanos.git","ssh_url":"git@github.com:alvaroaleman/thanos.git","clone_url":"https://github.com/alvaroaleman/thanos.git","svn_url":"https://github.com/alvaroaleman/thanos","homepage":"","size":45427,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"improbable-eng:master","ref":"master","sha":"770f85f64d32290f46721f20c7e9a9870a1915e8","user":{"login":"improbable-eng","id":26084283,"avatar_url":"https://avatars2.githubusercontent.com/u/26084283?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-eng","html_url":"https://github.com/improbable-eng","followers_url":"https://api.github.com/users/improbable-eng/followers","following_url":"https://api.github.com/users/improbable-eng/following{/other_user}","gists_url":"https://api.github.com/users/improbable-eng/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-eng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-eng/subscriptions","organizations_url":"https://api.github.com/users/improbable-eng/orgs","repos_url":"https://api.github.com/users/improbable-eng/repos","events_url":"https://api.github.com/users/improbable-eng/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-eng/received_events","type":"Organization","site_admin":false},"repo":{"id":109162639,"name":"thanos","full_name":"improbable-eng/thanos","owner":{"login":"improbable-eng","id":26084283,"avatar_url":"https://avatars2.githubusercontent.com/u/26084283?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-eng","html_url":"https://github.com/improbable-eng","followers_url":"https://api.github.com/users/improbable-eng/followers","following_url":"https://api.github.com/users/improbable-eng/following{/other_user}","gists_url":"https://api.github.com/users/improbable-eng/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-eng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-eng/subscriptions","organizations_url":"https://api.github.com/users/improbable-eng/orgs","repos_url":"https://api.github.com/users/improbable-eng/repos","events_url":"https://api.github.com/users/improbable-eng/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-eng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/improbable-eng/thanos","description":"Highly available Prometheus setup with long term storage capabilities.","fork":false,"url":"https://api.github.com/repos/improbable-eng/thanos","forks_url":"https://api.github.com/repos/improbable-eng/thanos/forks","keys_url":"https://api.github.com/repos/improbable-eng/thanos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/improbable-eng/thanos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/improbable-eng/thanos/teams","hooks_url":"https://api.github.com/repos/improbable-eng/thanos/hooks","issue_events_url":"https://api.github.com/repos/improbable-eng/thanos/issues/events{/number}","events_url":"https://api.github.com/repos/improbable-eng/thanos/events","assignees_url":"https://api.github.com/repos/improbable-eng/thanos/assignees{/user}","branches_url":"https://api.github.com/repos/improbable-eng/thanos/branches{/branch}","tags_url":"https://api.github.com/repos/improbable-eng/thanos/tags","blobs_url":"https://api.github.com/repos/improbable-eng/thanos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/improbable-eng/thanos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/improbable-eng/thanos/git/refs{/sha}","trees_url":"https://api.github.com/repos/improbable-eng/thanos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/improbable-eng/thanos/statuses/{sha}","languages_url":"https://api.github.com/repos/improbable-eng/thanos/languages","stargazers_url":"https://api.github.com/repos/improbable-eng/thanos/stargazers","contributors_url":"https://api.github.com/repos/improbable-eng/thanos/contributors","subscribers_url":"https://api.github.com/repos/improbable-eng/thanos/subscribers","subscription_url":"https://api.github.com/repos/improbable-eng/thanos/subscription","commits_url":"https://api.github.com/repos/improbable-eng/thanos/commits{/sha}","git_commits_url":"https://api.github.com/repos/improbable-eng/thanos/git/commits{/sha}","comments_url":"https://api.github.com/repos/improbable-eng/thanos/comments{/number}","issue_comment_url":"https://api.github.com/repos/improbable-eng/thanos/issues/comments{/number}","contents_url":"https://api.github.com/repos/improbable-eng/thanos/contents/{+path}","compare_url":"https://api.github.com/repos/improbable-eng/thanos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/improbable-eng/thanos/merges","archive_url":"https://api.github.com/repos/improbable-eng/thanos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/improbable-eng/thanos/downloads","issues_url":"https://api.github.com/repos/improbable-eng/thanos/issues{/number}","pulls_url":"https://api.github.com/repos/improbable-eng/thanos/pulls{/number}","milestones_url":"https://api.github.com/repos/improbable-eng/thanos/milestones{/number}","notifications_url":"https://api.github.com/repos/improbable-eng/thanos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/improbable-eng/thanos/labels{/name}","releases_url":"https://api.github.com/repos/improbable-eng/thanos/releases{/id}","deployments_url":"https://api.github.com/repos/improbable-eng/thanos/deployments","created_at":"2017-11-01T17:38:03Z","updated_at":"2018-05-07T01:22:38Z","pushed_at":"2018-05-06T20:58:04Z","git_url":"git://github.com/improbable-eng/thanos.git","ssh_url":"git@github.com:improbable-eng/thanos.git","clone_url":"https://github.com/improbable-eng/thanos.git","svn_url":"https://github.com/improbable-eng/thanos","homepage":"","size":45450,"stargazers_count":625,"watchers_count":625,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":27,"open_issues":38,"watchers":625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/324"},"html":{"href":"https://github.com/improbable-eng/thanos/pull/324"},"issue":{"href":"https://api.github.com/repos/improbable-eng/thanos/issues/324"},"comments":{"href":"https://api.github.com/repos/improbable-eng/thanos/issues/324/comments"},"review_comments":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/324/comments"},"review_comment":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/324/commits"},"statuses":{"href":"https://api.github.com/repos/improbable-eng/thanos/statuses/3fbe91ad03eb382e5a5b2b7ea3acec914c8df810"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alvaroaleman"}}