{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/client_java/issues/394","repository_url":"https://api.github.com/repos/prometheus/client_java","labels_url":"https://api.github.com/repos/prometheus/client_java/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/client_java/issues/394/comments","events_url":"https://api.github.com/repos/prometheus/client_java/issues/394/events","html_url":"https://github.com/prometheus/client_java/pull/394","id":337500755,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NjY2Mjkx","number":394,"title":"Fixing filtering with CollertorRegistry","user":{"login":"m1k3","id":136325,"node_id":"MDQ6VXNlcjEzNjMyNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/136325?v=4","gravatar_id":"","url":"https://api.github.com/users/m1k3","html_url":"https://github.com/m1k3","followers_url":"https://api.github.com/users/m1k3/followers","following_url":"https://api.github.com/users/m1k3/following{/other_user}","gists_url":"https://api.github.com/users/m1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/m1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1k3/subscriptions","organizations_url":"https://api.github.com/users/m1k3/orgs","repos_url":"https://api.github.com/users/m1k3/repos","events_url":"https://api.github.com/users/m1k3/events{/privacy}","received_events_url":"https://api.github.com/users/m1k3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-02T12:37:48Z","updated_at":"2018-07-02T12:57:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/prometheus/client_java/pulls/394","html_url":"https://github.com/prometheus/client_java/pull/394","diff_url":"https://github.com/prometheus/client_java/pull/394.diff","patch_url":"https://github.com/prometheus/client_java/pull/394.patch"},"body":"It would cause an unsupported expection on an interator [here](https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/CollectorRegistry.java#L201) when there is more than one metric in a collector since `Arrays.asList` will produce an immutable list.\r\n\r\nsee https://stackoverflow.com/questions/2965747/why-do-i-get-an-unsupportedoperationexception-when-trying-to-remove-an-element-f\r\n\r\nAlso, the `describe` method was always returning an empty list causing the filtering [here](https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/CollectorRegistry.java#L98) to not find anything."},"comment":{"url":"https://api.github.com/repos/prometheus/client_java/issues/comments/401795649","html_url":"https://github.com/prometheus/client_java/pull/394#issuecomment-401795649","issue_url":"https://api.github.com/repos/prometheus/client_java/issues/394","id":401795649,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTc5NTY0OQ==","user":{"login":"m1k3","id":136325,"node_id":"MDQ6VXNlcjEzNjMyNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/136325?v=4","gravatar_id":"","url":"https://api.github.com/users/m1k3","html_url":"https://github.com/m1k3","followers_url":"https://api.github.com/users/m1k3/followers","following_url":"https://api.github.com/users/m1k3/following{/other_user}","gists_url":"https://api.github.com/users/m1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/m1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1k3/subscriptions","organizations_url":"https://api.github.com/users/m1k3/orgs","repos_url":"https://api.github.com/users/m1k3/repos","events_url":"https://api.github.com/users/m1k3/events{/privacy}","received_events_url":"https://api.github.com/users/m1k3/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T12:57:49Z","updated_at":"2018-07-02T12:57:49Z","author_association":"NONE","body":"I also had a version where the filter method was not trying to modify the underlying iterator, but as was working with other collectors I thought it made sense to modify the `DropwizardExport` to work with the code in the current `CollectorRegistry`."}}
{"actor":{"display_login":"m1k3"}}