Metrics filter doesn't work
dszakallas opened this issue · 0 comments
Describe the bug
The MetricFilter
doesn't filter the metrics.
Steps to reproduce the issue:
Set the corresponding parameters, creating an implementation that filters out everything, observe everything is still on the pgw.
Expected behavior
Well, it should filter the metrics :D
Additional context
I spent some time pondering on the code and came to the conclusion that the output of the MetricFilter we register never get used. The report will use everything in SparkDropwizardExports, created while constructing the sink, and not the arguments passed to the report function (which are the ones that are filtered). A viable approach is creating a new SparkDropwizardExports on every report, created from exclusively from the metrics passed to the report method.