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

[Monitoring] Adding a metric for task outcome #4458

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vitorguidi
Copy link
Collaborator

@vitorguidi vitorguidi commented Nov 27, 2024

Motivation

We currently have no metric that tracks the error rate for each task. This PR implements that, and the error rate can be obtained by summing up the metric with outcome=failure, divided by the overall sum.

This is useful for SLI alerting.

Part of #4271

Copy link
Collaborator

@jonathanmetzman jonathanmetzman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utask_main is run with utasks.uworker_bot_main You might want to catch this too.

except BaseException:
# On any other exceptions, update state to reflect error and re-raise.
rate_limiter.record_task(success=False)
_emit_task_outcome_metric(task_name, job_name, 'failure')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will record preprocess and postprocess as tasks if that's what we want.

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.

2 participants