GitHub user eanikindfi added a comment to the discussion: Invalid metric values 
for completed tasks task.cpu_usage_percent/task.mem_usage_percent

So we have migrated to otel and now the problem is gone. If airflow task is 
complete, we actually see that metrics for this task disappear like 1-5 minutes 
later.

But we have additional question now, and I don't want to start a new post, 
because it is related.

[In official 
documentation](https://github.com/apache/airflow/blob/v2-10-stable/docs/apache-airflow/administration-and-deployment/logging-monitoring/metrics.rst#gauges)
 we have description: "Percentage of CPU used by a task". It is not clear for 
us from each value it is calculated, if we talk about worker containers in pods 
in k8s? For example, cpu metric (task.cpu_usage) for random task shows value 
44.4. It means, that in given point of time this task used 44.4% of given CPU. 
But what is given (total) CPU in this case exactly?
We use airflow chart with celery executors and 4 replicas (pods) of workers.

@potiuk please tag someone for answer, I hope it is a trivial question :)

GitHub link: 
https://github.com/apache/airflow/discussions/43460#discussioncomment-12371257

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to