Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

saguziel
Copy link
Contributor

@saguziel saguziel commented Aug 8, 2017

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

  • Here are some details about my PR, including screenshots of any UI changes: Adds two gauges

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason: None needed, just emits metric

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@@ -1446,6 +1446,7 @@ def signal_handler(signum, frame):

Stats.incr('operator_successes_{}'.format(
self.task.__class__.__name__), 1, 1)
Stats.incr('task_success')
Copy link
Contributor

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-io
Copy link

codecov-io commented Aug 8, 2017

Codecov Report

Merging #2504 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2504      +/-   ##
==========================================
+ Coverage   69.98%   69.99%   +<.01%     
==========================================
  Files         146      146              
  Lines       11446    11448       +2     
==========================================
+ Hits         8011     8013       +2     
  Misses       3435     3435
Impacted Files Coverage Δ
airflow/models.py 87.32% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9109d6...c33503d. Read the comment docs.

@saguziel saguziel force-pushed the aguziel-add-task-stat branch 2 times, most recently from 6bdd989 to c33503d Compare August 8, 2017 18:50
@Acehaidrey
Copy link
Contributor

Acehaidrey commented Aug 9, 2017

A comment about statsd stats in Airflow in general they are incorrect some are incorrect. Was wondering will there be any priority to fix those stats? AIRFLOW-774 is what I'm referencing.

@aoen
Copy link
Contributor

aoen commented Aug 9, 2017

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.

@Acehaidrey
Copy link
Contributor

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

@saguziel saguziel changed the title [AIRFLOW-1492] Add gauge for task successes/failures [AIRFLOW-1492] Add metric for task successes/failures Aug 10, 2017
@aoen
Copy link
Contributor

aoen commented Aug 10, 2017

LGTM

@asfgit asfgit closed this in fa84d49 Aug 10, 2017
saguziel added a commit to saguziel/incubator-airflow that referenced this pull request Sep 14, 2017
Closes apache#2504 from saguziel/aguziel-add-task-stat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants