{"action":"opened","issue":{"url":"https://api.github.com/repos/dropwizard/metrics/issues/1112","repository_url":"https://api.github.com/repos/dropwizard/metrics","labels_url":"https://api.github.com/repos/dropwizard/metrics/issues/1112/labels{/name}","comments_url":"https://api.github.com/repos/dropwizard/metrics/issues/1112/comments","events_url":"https://api.github.com/repos/dropwizard/metrics/issues/1112/events","html_url":"https://github.com/dropwizard/metrics/issues/1112","id":215384361,"number":1112,"title":"How to report a value just once","user":{"login":"markus-s24","id":8034593,"avatar_url":"https://avatars1.githubusercontent.com/u/8034593?v=3","gravatar_id":"","url":"https://api.github.com/users/markus-s24","html_url":"https://github.com/markus-s24","followers_url":"https://api.github.com/users/markus-s24/followers","following_url":"https://api.github.com/users/markus-s24/following{/other_user}","gists_url":"https://api.github.com/users/markus-s24/gists{/gist_id}","starred_url":"https://api.github.com/users/markus-s24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus-s24/subscriptions","organizations_url":"https://api.github.com/users/markus-s24/orgs","repos_url":"https://api.github.com/users/markus-s24/repos","events_url":"https://api.github.com/users/markus-s24/events{/privacy}","received_events_url":"https://api.github.com/users/markus-s24/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-20T10:51:16Z","updated_at":"2017-03-20T10:51:16Z","closed_at":null,"body":"I would like to report a value just once and wonder how to do it with this library?\r\n\r\nOne solution is to use a Gauge which resets itself after accessing getValue() or after a short period of time. But this is not working with more than one or differently configured reporters. And adding gauges is a bit cumbersome for this case, because MetricRegistry#getOrAdd is not public.\r\n\r\nAnother solution is to directly call report() at all reporters, which works fine. But due to reporters configured via XML <metrics:reporter> tags suppress autowiring by type, this requires explicit injection of the reporters, what causes overhead."}}
{"actor":{"display_login":"markus-s24"}}