ArshiaZr commented on code in PR #43340:
URL: https://github.com/apache/airflow/pull/43340#discussion_r1841346917


##########
airflow/metrics/datadog_logger.py:
##########
@@ -51,7 +55,33 @@
     )
 
 
-class SafeDogStatsdLogger:
+def prepare_stat_with_tags(fn: T) -> T:
+    """Prepare tags and stat."""
+
+    @wraps(fn)
+    def wrapper(self, stat: str | None = None, *args, tags: dict[str, str] | 
None = None, **kwargs):
+        stat = stat or ""
+
+        if tags and self.metrics_tags:
+            valid_tags: dict[str, str] = {}
+            for k, v in tags.items():
+                if self.metric_tags_validator.test(k):
+                    if all(c not in [",", "="] for c in f"{v}{k}"):

Review Comment:
   As far as I know, it's not checking it that's why we have the same checks in 
Statd.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to