nickstenning commented on code in PR #62436:
URL: https://github.com/apache/airflow/pull/62436#discussion_r2852797185
##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -300,7 +292,7 @@ def _emit_metrics(self, open_slots, num_running_tasks,
num_queued_tasks):
queued_tasks_metric_name =
self._get_metric_name("executor.queued_tasks")
running_tasks_metric_name =
self._get_metric_name("executor.running_tasks")
- span = Trace.get_current_span()
+ span = trace.get_current_span()
if span.is_recording():
Review Comment:
Checking `span.is_recording()` is only really needed if the code it guards
is expensive. I don't think it's needed here.
(I'm also not really sure whether the span event is needed either. These
look like they should be attrs on the span, not an event...)
--
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]