{"action":"created","comment":{"url":"https://api.github.com/repos/pinterest/elixometer/pulls/comments/48491433","id":48491433,"diff_hunk":"@@ -281,6 +281,9 @@ defmodule Elixometer do\n   @doc \"\"\"\n   Updates a counter metric. If the metric doesn't exist, the metric is created\n   and the metric is subscribed to the default reporter.\n+\n+  If the value of the `:reset_seconds` option is greater than zero, the counter will be reset\n+  automatically at the specified interval.\n   \"\"\"\n   def update_counter(name, delta, opts \\\\ [reset_seconds: 60]) when is_bitstring(name) do","path":"lib/elixometer.ex","position":8,"original_position":8,"commit_id":"c5b68804acdc6086b073efedb1413a2f35e2be30","original_commit_id":"c5b68804acdc6086b073efedb1413a2f35e2be30","user":{"login":"scohen","id":55809,"avatar_url":"https://avatars.githubusercontent.com/u/55809?v=3","gravatar_id":"","url":"https://api.github.com/users/scohen","html_url":"https://github.com/scohen","followers_url":"https://api.github.com/users/scohen/followers","following_url":"https://api.github.com/users/scohen/following{/other_user}","gists_url":"https://api.github.com/users/scohen/gists{/gist_id}","starred_url":"https://api.github.com/users/scohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scohen/subscriptions","organizations_url":"https://api.github.com/users/scohen/orgs","repos_url":"https://api.github.com/users/scohen/repos","events_url":"https://api.github.com/users/scohen/events{/privacy}","received_events_url":"https://api.github.com/users/scohen/received_events","type":"User","site_admin":false},"body":"I think making `reset_seconds` nil by default (no reset) makes more sense. I don't remember why I made the default 60; ","created_at":"2015-12-28T17:02:54Z","updated_at":"2015-12-28T17:02:54Z","html_url":"https://github.com/pinterest/elixometer/pull/9#discussion_r48491433","pull_request_url":"https://api.github.com/repos/pinterest/elixometer/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/comments/48491433"},"html":{"href":"https://github.com/pinterest/elixometer/pull/9#discussion_r48491433"},"pull_request":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/pinterest/elixometer/pulls/9","id":54576158,"html_url":"https://github.com/pinterest/elixometer/pull/9","diff_url":"https://github.com/pinterest/elixometer/pull/9.diff","patch_url":"https://github.com/pinterest/elixometer/pull/9.patch","issue_url":"https://api.github.com/repos/pinterest/elixometer/issues/9","number":9,"state":"open","locked":false,"title":"Allow counters that don't automatically reset","user":{"login":"cwc","id":115420,"avatar_url":"https://avatars.githubusercontent.com/u/115420?v=3","gravatar_id":"","url":"https://api.github.com/users/cwc","html_url":"https://github.com/cwc","followers_url":"https://api.github.com/users/cwc/followers","following_url":"https://api.github.com/users/cwc/following{/other_user}","gists_url":"https://api.github.com/users/cwc/gists{/gist_id}","starred_url":"https://api.github.com/users/cwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwc/subscriptions","organizations_url":"https://api.github.com/users/cwc/orgs","repos_url":"https://api.github.com/users/cwc/repos","events_url":"https://api.github.com/users/cwc/events{/privacy}","received_events_url":"https://api.github.com/users/cwc/received_events","type":"User","site_admin":false},"body":"My use case is tracking quota usage for a third party API, where the usage meter resets daily. I'd planned on resetting my quota counter at the appropriate time with [Quantum](https://github.com/c-rack/quantum-elixir), but soon realized that counter values already reset every 60 seconds by default. So, I made it possible to disable the auto-reset. The change should be non-breaking.\r\n\r\nI am curious, though: why is auto-reset the default? AFAICT, Exometer doesn't do this.","created_at":"2015-12-25T06:26:29Z","updated_at":"2015-12-28T17:02:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40c1767960c0c37583e03b0f3634733be2e37495","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pinterest/elixometer/pulls/9/commits","review_comments_url":"https://api.github.com/repos/pinterest/elixometer/pulls/9/comments","review_comment_url":"https://api.github.com/repos/pinterest/elixometer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pinterest/elixometer/issues/9/comments","statuses_url":"https://api.github.com/repos/pinterest/elixometer/statuses/c5b68804acdc6086b073efedb1413a2f35e2be30","head":{"label":"cwc:master","ref":"master","sha":"c5b68804acdc6086b073efedb1413a2f35e2be30","user":{"login":"cwc","id":115420,"avatar_url":"https://avatars.githubusercontent.com/u/115420?v=3","gravatar_id":"","url":"https://api.github.com/users/cwc","html_url":"https://github.com/cwc","followers_url":"https://api.github.com/users/cwc/followers","following_url":"https://api.github.com/users/cwc/following{/other_user}","gists_url":"https://api.github.com/users/cwc/gists{/gist_id}","starred_url":"https://api.github.com/users/cwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwc/subscriptions","organizations_url":"https://api.github.com/users/cwc/orgs","repos_url":"https://api.github.com/users/cwc/repos","events_url":"https://api.github.com/users/cwc/events{/privacy}","received_events_url":"https://api.github.com/users/cwc/received_events","type":"User","site_admin":false},"repo":{"id":48558778,"name":"elixometer","full_name":"cwc/elixometer","owner":{"login":"cwc","id":115420,"avatar_url":"https://avatars.githubusercontent.com/u/115420?v=3","gravatar_id":"","url":"https://api.github.com/users/cwc","html_url":"https://github.com/cwc","followers_url":"https://api.github.com/users/cwc/followers","following_url":"https://api.github.com/users/cwc/following{/other_user}","gists_url":"https://api.github.com/users/cwc/gists{/gist_id}","starred_url":"https://api.github.com/users/cwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwc/subscriptions","organizations_url":"https://api.github.com/users/cwc/orgs","repos_url":"https://api.github.com/users/cwc/repos","events_url":"https://api.github.com/users/cwc/events{/privacy}","received_events_url":"https://api.github.com/users/cwc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cwc/elixometer","description":"A light Elixir wrapper around exometer.","fork":true,"url":"https://api.github.com/repos/cwc/elixometer","forks_url":"https://api.github.com/repos/cwc/elixometer/forks","keys_url":"https://api.github.com/repos/cwc/elixometer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cwc/elixometer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cwc/elixometer/teams","hooks_url":"https://api.github.com/repos/cwc/elixometer/hooks","issue_events_url":"https://api.github.com/repos/cwc/elixometer/issues/events{/number}","events_url":"https://api.github.com/repos/cwc/elixometer/events","assignees_url":"https://api.github.com/repos/cwc/elixometer/assignees{/user}","branches_url":"https://api.github.com/repos/cwc/elixometer/branches{/branch}","tags_url":"https://api.github.com/repos/cwc/elixometer/tags","blobs_url":"https://api.github.com/repos/cwc/elixometer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cwc/elixometer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cwc/elixometer/git/refs{/sha}","trees_url":"https://api.github.com/repos/cwc/elixometer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cwc/elixometer/statuses/{sha}","languages_url":"https://api.github.com/repos/cwc/elixometer/languages","stargazers_url":"https://api.github.com/repos/cwc/elixometer/stargazers","contributors_url":"https://api.github.com/repos/cwc/elixometer/contributors","subscribers_url":"https://api.github.com/repos/cwc/elixometer/subscribers","subscription_url":"https://api.github.com/repos/cwc/elixometer/subscription","commits_url":"https://api.github.com/repos/cwc/elixometer/commits{/sha}","git_commits_url":"https://api.github.com/repos/cwc/elixometer/git/commits{/sha}","comments_url":"https://api.github.com/repos/cwc/elixometer/comments{/number}","issue_comment_url":"https://api.github.com/repos/cwc/elixometer/issues/comments{/number}","contents_url":"https://api.github.com/repos/cwc/elixometer/contents/{+path}","compare_url":"https://api.github.com/repos/cwc/elixometer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cwc/elixometer/merges","archive_url":"https://api.github.com/repos/cwc/elixometer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cwc/elixometer/downloads","issues_url":"https://api.github.com/repos/cwc/elixometer/issues{/number}","pulls_url":"https://api.github.com/repos/cwc/elixometer/pulls{/number}","milestones_url":"https://api.github.com/repos/cwc/elixometer/milestones{/number}","notifications_url":"https://api.github.com/repos/cwc/elixometer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cwc/elixometer/labels{/name}","releases_url":"https://api.github.com/repos/cwc/elixometer/releases{/id}","created_at":"2015-12-24T22:54:01Z","updated_at":"2015-12-24T22:54:02Z","pushed_at":"2015-12-25T05:44:35Z","git_url":"git://github.com/cwc/elixometer.git","ssh_url":"git@github.com:cwc/elixometer.git","clone_url":"https://github.com/cwc/elixometer.git","svn_url":"https://github.com/cwc/elixometer","homepage":"","size":31,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pinterest:master","ref":"master","sha":"e21c64add2e7ff3ceaae7b19fce2e8f9ef1ac241","user":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"repo":{"id":40680676,"name":"elixometer","full_name":"pinterest/elixometer","owner":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pinterest/elixometer","description":"A light Elixir wrapper around exometer.","fork":false,"url":"https://api.github.com/repos/pinterest/elixometer","forks_url":"https://api.github.com/repos/pinterest/elixometer/forks","keys_url":"https://api.github.com/repos/pinterest/elixometer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinterest/elixometer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinterest/elixometer/teams","hooks_url":"https://api.github.com/repos/pinterest/elixometer/hooks","issue_events_url":"https://api.github.com/repos/pinterest/elixometer/issues/events{/number}","events_url":"https://api.github.com/repos/pinterest/elixometer/events","assignees_url":"https://api.github.com/repos/pinterest/elixometer/assignees{/user}","branches_url":"https://api.github.com/repos/pinterest/elixometer/branches{/branch}","tags_url":"https://api.github.com/repos/pinterest/elixometer/tags","blobs_url":"https://api.github.com/repos/pinterest/elixometer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinterest/elixometer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinterest/elixometer/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinterest/elixometer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinterest/elixometer/statuses/{sha}","languages_url":"https://api.github.com/repos/pinterest/elixometer/languages","stargazers_url":"https://api.github.com/repos/pinterest/elixometer/stargazers","contributors_url":"https://api.github.com/repos/pinterest/elixometer/contributors","subscribers_url":"https://api.github.com/repos/pinterest/elixometer/subscribers","subscription_url":"https://api.github.com/repos/pinterest/elixometer/subscription","commits_url":"https://api.github.com/repos/pinterest/elixometer/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinterest/elixometer/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinterest/elixometer/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinterest/elixometer/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinterest/elixometer/contents/{+path}","compare_url":"https://api.github.com/repos/pinterest/elixometer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinterest/elixometer/merges","archive_url":"https://api.github.com/repos/pinterest/elixometer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinterest/elixometer/downloads","issues_url":"https://api.github.com/repos/pinterest/elixometer/issues{/number}","pulls_url":"https://api.github.com/repos/pinterest/elixometer/pulls{/number}","milestones_url":"https://api.github.com/repos/pinterest/elixometer/milestones{/number}","notifications_url":"https://api.github.com/repos/pinterest/elixometer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinterest/elixometer/labels{/name}","releases_url":"https://api.github.com/repos/pinterest/elixometer/releases{/id}","created_at":"2015-08-13T20:39:06Z","updated_at":"2015-12-25T22:03:08Z","pushed_at":"2015-12-25T06:26:29Z","git_url":"git://github.com/pinterest/elixometer.git","ssh_url":"git@github.com:pinterest/elixometer.git","clone_url":"https://github.com/pinterest/elixometer.git","svn_url":"https://github.com/pinterest/elixometer","homepage":"","size":27,"stargazers_count":150,"watchers_count":150,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/9"},"html":{"href":"https://github.com/pinterest/elixometer/pull/9"},"issue":{"href":"https://api.github.com/repos/pinterest/elixometer/issues/9"},"comments":{"href":"https://api.github.com/repos/pinterest/elixometer/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pinterest/elixometer/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/pinterest/elixometer/statuses/c5b68804acdc6086b073efedb1413a2f35e2be30"}}}}