xBis7 commented on code in PR #63932:
URL: https://github.com/apache/airflow/pull/63932#discussion_r3010524605


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -1179,7 +1182,7 @@ def prepare_file_queue(self, known_files: dict[str, 
set[DagFileInfo]]):
         if self._parsing_start_time is not None:
             emit_metrics(
                 parse_time=time.perf_counter() - self._parsing_start_time,
-                stats=list(self._file_stats.values()),
+                dag_file_stats=list(self._file_stats.values()),

Review Comment:
   The old `stats` param was shadowing the new `stats` module import and we 
were ending up with a mypy error



##########
airflow-core/src/airflow/stats.py:
##########
@@ -15,17 +15,16 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""Deprecated module - Stats moved to airflow.observability.stats but we have 
to retain compat."""
+"""Deprecated module - stats moved to airflow.observability.stats."""
 
 from __future__ import annotations
 
 import warnings
 
-from airflow.sdk.observability.stats import Stats as Stats

Review Comment:
   I'm not so sure about the changes in this file. I could add an import to the 
`Stats` shim.
   
   Also, importing from `airflow.sdk.observability...` instead of 
`airflow.observability...` seemed like an oversight during a copy-paste. I 
don't know if it was intentional.



##########
shared/observability/src/airflow_shared/observability/metrics/datadog_logger.py:
##########
@@ -177,7 +176,7 @@ def get_dogstatsd_logger(
     from datadog import DogStatsd
 
     dogstatsd_kwargs: dict[str, Any] = {
-        "constant_tags": cls.get_constant_tags(tags_in_string=tags_in_string),

Review Comment:
   This used to be
   
   ```python
       @classmethod
       def get_constant_tags(cls, *, tags_in_string: str | None) -> list[str]:
           """Get constant DataDog tags to add to all stats."""
           if not tags_in_string:
               return []
           return tags_in_string.split(",")
   ```
   
   It's much simpler to include the code here directly, especially since this 
is the only usage.



-- 
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