amoghrajesh commented on code in PR #62019:
URL: https://github.com/apache/airflow/pull/62019#discussion_r2815495131
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1173,6 +1173,11 @@ def _on_term(signum, frame):
state: TaskInstanceState
error: BaseException | None = None
+ stats_tags = {"dag_id": ti.dag_id, "task_id": ti.task_id}
+ Stats.incr(f"ti.start.{ti.dag_id}.{ti.task_id}", tags=stats_tags)
+ # Same metric with tagging
+ Stats.incr("ti.start", tags=stats_tags)
Review Comment:
@xBis7 thanks for that, I assessed whether to use `DualStatsManager` or not
and decided to not because this is a bugfix for `3.1.8`, and 3.1.x doesn't have
the shared observability library:
https://github.com/apache/airflow/tree/v3-1-test/shared
Hence I decided to use the classic way of doing things to not divert the
code during cherry pick. We can certainly follow up in a later PR to migrate
all `Stats` usages in task sdk to use `DualStatsManager`, what do you think
about that?
--
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]