{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/comments/154449189","pull_request_review_id":80621679,"id":154449189,"diff_hunk":"@@ -203,6 +205,31 @@ There is one `MetricRegistry` instance for each of the scopes listed in <<scopes\n Metrics can be added to or retrieved from the registry either using the `@Metric` annotation\n (see <<api-annotations, Metrics Annotations>>) or using the `MetricRegistry` object directly.\n \n+[[reusing_of_metrics]]\n+==== Reusing of Metrics\n+\n+By default it is not allowed to register more than one metric under a certain name in a scope. This is done\n+to prevent hard to spot copy & paste errors, where for example all methods of a Jax-Rs class are marked with\n+`@Timed(name=\"myApp\", absolute=true)`.\n+\n+If this behaviour is required, then it is possible to mark all such instances as _reusable_ by passing\n+the respective flag via Metadata or field in the Annotation. Gauges are not reusable.\n+\n+TIP: If you want to re-use a metric name, then you need to also explicitly set the `name` field.\n+","path":"spec/src/main/asciidoc/metrics_spec.adoc","position":24,"original_position":24,"commit_id":"8804648627d08195f9075c3a368ff5bad5a14366","original_commit_id":"8804648627d08195f9075c3a368ff5bad5a14366","user":{"login":"donbourne","id":17110503,"avatar_url":"https://avatars2.githubusercontent.com/u/17110503?v=4","gravatar_id":"","url":"https://api.github.com/users/donbourne","html_url":"https://github.com/donbourne","followers_url":"https://api.github.com/users/donbourne/followers","following_url":"https://api.github.com/users/donbourne/following{/other_user}","gists_url":"https://api.github.com/users/donbourne/gists{/gist_id}","starred_url":"https://api.github.com/users/donbourne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donbourne/subscriptions","organizations_url":"https://api.github.com/users/donbourne/orgs","repos_url":"https://api.github.com/users/donbourne/repos","events_url":"https://api.github.com/users/donbourne/events{/privacy}","received_events_url":"https://api.github.com/users/donbourne/received_events","type":"User","site_admin":false},"body":"see my other comment on this.  I may also have 2 methods in 2 different classes try to register with the same name if I set absolute=true.","created_at":"2017-12-01T21:09:55Z","updated_at":"2017-12-01T21:09:55Z","html_url":"https://github.com/eclipse/microprofile-metrics/pull/183#discussion_r154449189","pull_request_url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/comments/154449189"},"html":{"href":"https://github.com/eclipse/microprofile-metrics/pull/183#discussion_r154449189"},"pull_request":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183","id":154213372,"html_url":"https://github.com/eclipse/microprofile-metrics/pull/183","diff_url":"https://github.com/eclipse/microprofile-metrics/pull/183.diff","patch_url":"https://github.com/eclipse/microprofile-metrics/pull/183.patch","issue_url":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/183","number":183,"state":"open","locked":false,"title":"Describe reusable metrics. Adresses #162","user":{"login":"pilhuhn","id":208246,"avatar_url":"https://avatars0.githubusercontent.com/u/208246?v=4","gravatar_id":"","url":"https://api.github.com/users/pilhuhn","html_url":"https://github.com/pilhuhn","followers_url":"https://api.github.com/users/pilhuhn/followers","following_url":"https://api.github.com/users/pilhuhn/following{/other_user}","gists_url":"https://api.github.com/users/pilhuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/pilhuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilhuhn/subscriptions","organizations_url":"https://api.github.com/users/pilhuhn/orgs","repos_url":"https://api.github.com/users/pilhuhn/repos","events_url":"https://api.github.com/users/pilhuhn/events{/privacy}","received_events_url":"https://api.github.com/users/pilhuhn/received_events","type":"User","site_admin":false},"body":"cc @starksm64 @astefanutti ","created_at":"2017-11-22T17:21:43Z","updated_at":"2017-12-01T21:09:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2220f155c324bc23f135728e25bacad8438f9e12","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183/commits","review_comments_url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183/comments","review_comment_url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/183/comments","statuses_url":"https://api.github.com/repos/eclipse/microprofile-metrics/statuses/8804648627d08195f9075c3a368ff5bad5a14366","head":{"label":"pilhuhn:shared_metrics","ref":"shared_metrics","sha":"8804648627d08195f9075c3a368ff5bad5a14366","user":{"login":"pilhuhn","id":208246,"avatar_url":"https://avatars0.githubusercontent.com/u/208246?v=4","gravatar_id":"","url":"https://api.github.com/users/pilhuhn","html_url":"https://github.com/pilhuhn","followers_url":"https://api.github.com/users/pilhuhn/followers","following_url":"https://api.github.com/users/pilhuhn/following{/other_user}","gists_url":"https://api.github.com/users/pilhuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/pilhuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilhuhn/subscriptions","organizations_url":"https://api.github.com/users/pilhuhn/orgs","repos_url":"https://api.github.com/users/pilhuhn/repos","events_url":"https://api.github.com/users/pilhuhn/events{/privacy}","received_events_url":"https://api.github.com/users/pilhuhn/received_events","type":"User","site_admin":false},"repo":{"id":95679358,"name":"microprofile-metrics","full_name":"pilhuhn/microprofile-metrics","owner":{"login":"pilhuhn","id":208246,"avatar_url":"https://avatars0.githubusercontent.com/u/208246?v=4","gravatar_id":"","url":"https://api.github.com/users/pilhuhn","html_url":"https://github.com/pilhuhn","followers_url":"https://api.github.com/users/pilhuhn/followers","following_url":"https://api.github.com/users/pilhuhn/following{/other_user}","gists_url":"https://api.github.com/users/pilhuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/pilhuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilhuhn/subscriptions","organizations_url":"https://api.github.com/users/pilhuhn/orgs","repos_url":"https://api.github.com/users/pilhuhn/repos","events_url":"https://api.github.com/users/pilhuhn/events{/privacy}","received_events_url":"https://api.github.com/users/pilhuhn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pilhuhn/microprofile-metrics","description":"microprofile-metrics","fork":true,"url":"https://api.github.com/repos/pilhuhn/microprofile-metrics","forks_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/forks","keys_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/teams","hooks_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/hooks","issue_events_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/issues/events{/number}","events_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/events","assignees_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/assignees{/user}","branches_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/branches{/branch}","tags_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/tags","blobs_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/languages","stargazers_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/stargazers","contributors_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/contributors","subscribers_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/subscribers","subscription_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/subscription","commits_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/contents/{+path}","compare_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/merges","archive_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/downloads","issues_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/issues{/number}","pulls_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/labels{/name}","releases_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/releases{/id}","deployments_url":"https://api.github.com/repos/pilhuhn/microprofile-metrics/deployments","created_at":"2017-06-28T14:43:32Z","updated_at":"2017-08-22T17:51:33Z","pushed_at":"2017-11-29T14:45:04Z","git_url":"git://github.com/pilhuhn/microprofile-metrics.git","ssh_url":"git@github.com:pilhuhn/microprofile-metrics.git","clone_url":"https://github.com/pilhuhn/microprofile-metrics.git","svn_url":"https://github.com/pilhuhn/microprofile-metrics","homepage":null,"size":346,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"2e1cf20851e5410b53121c643eb8fca22c79742d","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":95594455,"name":"microprofile-metrics","full_name":"eclipse/microprofile-metrics","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/microprofile-metrics","description":"microprofile-metrics","fork":false,"url":"https://api.github.com/repos/eclipse/microprofile-metrics","forks_url":"https://api.github.com/repos/eclipse/microprofile-metrics/forks","keys_url":"https://api.github.com/repos/eclipse/microprofile-metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/microprofile-metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/microprofile-metrics/teams","hooks_url":"https://api.github.com/repos/eclipse/microprofile-metrics/hooks","issue_events_url":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/microprofile-metrics/events","assignees_url":"https://api.github.com/repos/eclipse/microprofile-metrics/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/microprofile-metrics/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/microprofile-metrics/tags","blobs_url":"https://api.github.com/repos/eclipse/microprofile-metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/microprofile-metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/microprofile-metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/microprofile-metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/microprofile-metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/microprofile-metrics/languages","stargazers_url":"https://api.github.com/repos/eclipse/microprofile-metrics/stargazers","contributors_url":"https://api.github.com/repos/eclipse/microprofile-metrics/contributors","subscribers_url":"https://api.github.com/repos/eclipse/microprofile-metrics/subscribers","subscription_url":"https://api.github.com/repos/eclipse/microprofile-metrics/subscription","commits_url":"https://api.github.com/repos/eclipse/microprofile-metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/microprofile-metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/microprofile-metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/microprofile-metrics/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/microprofile-metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/microprofile-metrics/merges","archive_url":"https://api.github.com/repos/eclipse/microprofile-metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/microprofile-metrics/downloads","issues_url":"https://api.github.com/repos/eclipse/microprofile-metrics/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/microprofile-metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/microprofile-metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/microprofile-metrics/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/microprofile-metrics/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/microprofile-metrics/deployments","created_at":"2017-06-27T19:44:21Z","updated_at":"2017-11-30T21:03:30Z","pushed_at":"2017-12-01T15:08:43Z","git_url":"git://github.com/eclipse/microprofile-metrics.git","ssh_url":"git@github.com:eclipse/microprofile-metrics.git","clone_url":"https://github.com/eclipse/microprofile-metrics.git","svn_url":"https://github.com/eclipse/microprofile-metrics","homepage":null,"size":333,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":31,"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":14,"open_issues":31,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183"},"html":{"href":"https://github.com/eclipse/microprofile-metrics/pull/183"},"issue":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/183"},"comments":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/issues/183/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/pulls/183/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/microprofile-metrics/statuses/8804648627d08195f9075c3a368ff5bad5a14366"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"donbourne"}}