Github user Ethanlm commented on the issue:
https://github.com/apache/storm/pull/2714
Thanks for the contribution. It's good to exploit more on metrics
functionality.
I don't see the real need for adding filters since it's all storm internal
code. But if you think it's better to have, I would suggest to use a filter
layer to make this more flexible.
For example,
Create a filter interface with a filter function. e.g.
```
public interface IStormMetricsRegistryFilter {
public default boolean filter(String metricName) {
return false;
}
}
```
then you can have a function (e.g. addFilter) in StormMetricsRegistryFilter
to add real implementation of the filter interface before StormMetricsRegistry
starts to registerMeters().
The above is a very simple interface and might not be able to do much
except filtering based on the `String` parameter. You can think about more on
this.
I think the current implementation in this PR won't work because you are
calling `setsource()` to late
---