airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Add metrics_allow_list and metrics_block_list to statsd deployments env

Open Xiroo opened this issue 1 year ago • 1 comments

I think it is needed to be ensure that the metrics_allow_list and metrics_block_list are added to the StatsD pod's environment variables. This update is crucial for refreshing the pod configuration effectively.

Initially configuring the StatsD pod without these lists and adding them later can lead to inconsistencies. Specifically, while changes to metrics_allow_list or metrics_block_list update the airflow.cfg and trigger a refresh of the related Airflow components (like the scheduler and webserver), the StatsD pod does not get automatically updated because its configuration remains unchanged.

This behavior results in the metrics not being updated according to the newly set rules, although the fields themselves are not deleted—they simply stop updating. For example, when using the StatsD scraper for Prometheus, I noticed that metrics intended to be blocked were still present, albeit without updates. Initially, I suspected an issue with the block list and allow list functionality, but it turned out that the real issue was the StatsD pod not being refreshed, causing the old metric fields to persist.

Therefore, it seems logical to include these configurations directly in the StatsD pod's environment variables, ensuring the pod is replaced and updated whenever these settings are configured.


^ Add meaningful description above Read the Pull Request Guidelines for more information. In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed. In case of a new dependency, check compliance with the ASF 3rd Party License Policy. In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Xiroo avatar Apr 03 '24 07:04 Xiroo

@eladkal looks good, can we merge it?

romsharon98 avatar Apr 21 '24 07:04 romsharon98

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 09 '24 00:09 github-actions[bot]