amoghrajesh commented on code in PR #61812:
URL: https://github.com/apache/airflow/pull/61812#discussion_r2817297885


##########
providers/edge3/src/airflow/providers/edge3/worker_api/routes/jobs.py:
##########
@@ -87,8 +87,6 @@ def fetch(
     # Edge worker does not backport emitted Airflow metrics, so export some 
metrics
     tags = {"dag_id": job.dag_id, "task_id": job.task_id, "queue": job.queue}
     try:
-        from airflow.sdk._shared.observability.metrics.dual_stats_manager 
import DualStatsManager
-
         DualStatsManager.incr("edge_worker.ti.start", tags=tags)

Review Comment:
   Now that I think more of it, since DualStatsManager is only present for 
3.2+. it doesn't make sense to add it in `compat` provider in the first place, 
I can just do a:
   
   ```python
   try:
       from airflow.sdk.observability.stats import DualStatsManager
   except ImportError:
       DualStatsManager = None  # type: ignore[assignment,misc]  # Airflow < 
3.2 compat
   ```
   
   This is what I am doing now



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