You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "syun64 (via GitHub)" <gi...@apache.org> on 2023/03/05 23:13:12 UTC

[GitHub] [airflow] syun64 commented on a diff in pull request #29881: Blocklist to disable specific metric tags or metric names

syun64 commented on code in PR #29881:
URL: https://github.com/apache/airflow/pull/29881#discussion_r1125752998


##########
airflow/stats.py:
##########
@@ -291,10 +315,11 @@ def wrapper(self, stat=None, *args, tags=None, **kwargs):
         if self.influxdb_tags_enabled:
             if stat is not None and tags is not None:
                 for k, v in tags.items():
-                    if all((c not in [",", "="] for c in v + k)):
-                        stat += f",{k}={v}"
-                    else:
-                        log.error("Dropping invalid tag: %s=%s.", k, v)
+                    if self.metric_tags_validator.test(k):

Review Comment:
   @hussein-awala 
   
   Aren't we only concatenating metric tags that are allowed? (i.e. not disabled / not blocked)
   
   If it's test(k) returns True, we will want to publish that metric tag



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org