Flink exported metrics scope configuration

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

Flink exported metrics scope configuration

Kai Fu
Hi team,

We noticed that Prometheus metrics exporter exports all of the metrics at the most fine-grained level, which is tremendous for the prometheus server especially when the parallelism is high. The metrics volume crawled from a single host(parallelism 8) is around 40MB for us currently. This is due to task_name attribute in the metrics generated by the engine being very long. The task_name attribute is auto-generated from SQL job, and it seems it's attaching all field names onto it.

We want to reduce the metrics volume by either drop task_name or at some more coarse-grained level. But I cannot find any related documents about this, any advice on that? 

Reply | Threaded
Open this post in threaded view
|

Re: Flink exported metrics scope configuration

Mason Chen
Hi Kai,

You can use the excluded variables config for the reporter. 
  • metrics.reporter.<name>.scope.variables.excludes: (optional) A semi-colon (;) separate list of variables that should be ignored by tag-based reporters (e.g., Prometheus, InfluxDB).


Best,
Mason

On Jun 3, 2021, at 9:31 PM, Kai Fu <[hidden email]> wrote:

Hi team,

We noticed that Prometheus metrics exporter exports all of the metrics at the most fine-grained level, which is tremendous for the prometheus server especially when the parallelism is high. The metrics volume crawled from a single host(parallelism 8) is around 40MB for us currently. This is due to task_name attribute in the metrics generated by the engine being very long. The task_name attribute is auto-generated from SQL job, and it seems it's attaching all field names onto it.

We want to reduce the metrics volume by either drop task_name or at some more coarse-grained level. But I cannot find any related documents about this, any advice on that? 


Reply | Threaded
Open this post in threaded view
|

Re: Flink exported metrics scope configuration

Kai Fu
Hi Mason,

Thank you for the advice, as I tried, it works and reduces a lot in size.

On Fri, Jun 4, 2021 at 11:45 AM Mason Chen <[hidden email]> wrote:
Hi Kai,

You can use the excluded variables config for the reporter. 
  • metrics.reporter.<name>.scope.variables.excludes: (optional) A semi-colon (;) separate list of variables that should be ignored by tag-based reporters (e.g., Prometheus, InfluxDB).


Best,
Mason

On Jun 3, 2021, at 9:31 PM, Kai Fu <[hidden email]> wrote:

Hi team,

We noticed that Prometheus metrics exporter exports all of the metrics at the most fine-grained level, which is tremendous for the prometheus server especially when the parallelism is high. The metrics volume crawled from a single host(parallelism 8) is around 40MB for us currently. This is due to task_name attribute in the metrics generated by the engine being very long. The task_name attribute is auto-generated from SQL job, and it seems it's attaching all field names onto it.

We want to reduce the metrics volume by either drop task_name or at some more coarse-grained level. But I cannot find any related documents about this, any advice on that? 




--
Best wishes,
- Kai