ArshiaZr commented on code in PR #43340:
URL: https://github.com/apache/airflow/pull/43340#discussion_r1841347288
##########
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:
But you're right I change the checks for "," and "=" to ":"
--
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]