New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-1492] Add metric for task successes/failures #2504
Conversation
614a4ce
to
8f246e0
Compare
airflow/models.py
Outdated
@@ -1446,6 +1446,7 @@ def signal_handler(signum, frame): | |||
|
|||
Stats.incr('operator_successes_{}'.format( | |||
self.task.__class__.__name__), 1, 1) | |||
Stats.incr('task_success') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success->successes (and same with failure) to be consistent with the other metric. Even better ti_successes since tasks are abstract.
Codecov Report
@@ Coverage Diff @@
## master #2504 +/- ##
==========================================
+ Coverage 69.98% 69.99% +<.01%
==========================================
Files 146 146
Lines 11446 11448 +2
==========================================
+ Hits 8011 8013 +2
Misses 3435 3435
Continue to review full report at Codecov.
|
6bdd989
to
c33503d
Compare
A comment about statsd stats in Airflow in |
I don't think that they are incorrect in general, there is a bug with that specific metrics (dagbag_size/collect_dags) you mentioned but I'm not aware of any other ones with issues. The failures/successes metric should work since it can be summed across all processes. |
Hey @aoen thanks for the response! Okay that's good to know, stats that are aggregated should be correct across all processes. I think you're right it was only those 3 stats in this ticket that we were seeing incorrectly |
LGTM |
Closes apache#2504 from saguziel/aguziel-add-task-stat
Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
@aoen @bolkedebruin
JIRA
Description
Tests
Commits