jscheffl commented on code in PR #68078:
URL: https://github.com/apache/airflow/pull/68078#discussion_r3399124629


##########
airflow-core/tests/unit/api_fastapi/test_app.py:
##########
@@ -168,3 +168,49 @@ def call_create_auth_manager():
     assert call_count == 1
 
     app_module.purge_cached_app()
+
+
+class TestInitializeTaskSdkStats:
+    """
+    The API server serves the Edge Worker REST API whose heartbeat handler 
records
+    ``edge_worker.*`` metrics through the Task SDK ``Stats`` singleton. Unlike 
other
+    components it never initialized that singleton, so Edge Worker metrics 
were dropped.
+    ``_initialize_task_sdk_stats`` (called from ``lifespan``) closes that gap.

Review Comment:
   Let's also neutralize this, e.g.
   ```suggestion
       Ensure that stats subsystem is properly initialized in API server.
   ```



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