You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Manish G <ma...@gmail.com> on 2020/07/08 15:19:32 UTC

Limiting metrics logs to custom metric

Hi,

I have added a Meter in my code and pushing it to app logs using slf4j
reporter.

I observe that apart from my custometrics, lots of other metrics like
gauge, histogram etc is also published. It makes it difficult to filter out
data for generating splunk graphs.

Is there a way to limit published metrics to just the custom one?

With regards

Re: Limiting metrics logs to custom metric

Posted by Chesnay Schepler <ch...@apache.org>.
Not really; but essentially you have to override 
SLF4JReporter#notifyOfAddedMetric and filter the metrics you're 
interested in. Then build the flink-metrics-slf4j module, and replace 
the corresponding jar in your distribution.

On 08/07/2020 18:20, Manish G wrote:
> Ok.Any resource on same?
>
>
> On Wed, Jul 8, 2020, 9:38 PM Chesnay Schepler <chesnay@apache.org 
> <ma...@apache.org>> wrote:
>
>     There's no built-in functionality for this. You could customize the
>     reporter though.
>
>     On 08/07/2020 17:19, Manish G wrote:
>     > Hi,
>     >
>     > I have added a Meter in my code and pushing it to app logs using
>     slf4j
>     > reporter.
>     >
>     > I observe that apart from my custometrics, lots of other metrics
>     like
>     > gauge, histogram etc is also published. It makes it difficult to
>     > filter out data for generating splunk graphs.
>     >
>     > Is there a way to limit published metrics to just the custom one?
>     >
>     > With regards
>
>


Re: Limiting metrics logs to custom metric

Posted by Manish G <ma...@gmail.com>.
Ok.Any resource on same?


On Wed, Jul 8, 2020, 9:38 PM Chesnay Schepler <ch...@apache.org> wrote:

> There's no built-in functionality for this. You could customize the
> reporter though.
>
> On 08/07/2020 17:19, Manish G wrote:
> > Hi,
> >
> > I have added a Meter in my code and pushing it to app logs using slf4j
> > reporter.
> >
> > I observe that apart from my custometrics, lots of other metrics like
> > gauge, histogram etc is also published. It makes it difficult to
> > filter out data for generating splunk graphs.
> >
> > Is there a way to limit published metrics to just the custom one?
> >
> > With regards
>
>
>

Re: Limiting metrics logs to custom metric

Posted by Chesnay Schepler <ch...@apache.org>.
There's no built-in functionality for this. You could customize the 
reporter though.

On 08/07/2020 17:19, Manish G wrote:
> Hi,
>
> I have added a Meter in my code and pushing it to app logs using slf4j 
> reporter.
>
> I observe that apart from my custometrics, lots of other metrics like 
> gauge, histogram etc is also published. It makes it difficult to 
> filter out data for generating splunk graphs.
>
> Is there a way to limit published metrics to just the custom one?
>
> With regards