uranusjr commented on code in PR #28961:
URL: https://github.com/apache/airflow/pull/28961#discussion_r1070913973
##########
airflow/dag_processing/processor.py:
##########
@@ -484,7 +486,13 @@ def manage_slas(self, dag: DAG, session: Session = None)
-> None:
callback(dag, task_list, blocking_task_list, slas,
blocking_tis)
notification_sent = True
except Exception:
- Stats.incr("sla_callback_notification_failure")
+ Stats.incr(
+ "sla_callback_notification_failure",
+ tags={
+ "dag_id": dag.dag_id,
+ "func_name": callback.func_name, # type:
ignore[attr-defined]
Review Comment:
This is not really related, but can anyone tell me where this `func_name`
attribute is set? I searched the entire code base and there’s not a trace of
it. The only other place that seems to reference this attribute (aside from
this block) is a test `test_dag_file_processor_sla_miss_callback_exception`,
and in that test the attribute does not actually exist and is only passing
because the “callback function” is a mock there.
https://github.com/apache/airflow/blob/d5ac1b057f96d94062a92d968fe40f4371eb5da0/tests/dag_processing/test_processor.py#L328-L332
--
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]