Limiting metrics logs to custom metric

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Limiting metrics logs to custom metric

Manish G
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
Reply | Threaded
Open this post in threaded view
|

Re: Limiting metrics logs to custom metric

Chesnay Schepler
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


Reply | Threaded
Open this post in threaded view
|

Re: Limiting metrics logs to custom metric

Manish G
Ok.Any resource on same?


On Wed, Jul 8, 2020, 9:38 PM Chesnay Schepler <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: Limiting metrics logs to custom metric

Chesnay Schepler
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 <[hidden email]> 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