-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Raise exception to report when openmetrics process fails #5392
Conversation
Codecov Report
|
@@ -32,5 +32,6 @@ def process(self, scraper_config, metric_transformers=None): | |||
super(LinkerdCheck, self).process(scraper_config, metric_transformers=metric_transformers) | |||
except Exception: | |||
self.gauge(self.HEALTH_METRIC, 1, tags=tags) | |||
raise |
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.
Can we also log a message?
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.
Doesn't raise
alone raises the same exception?
Reading this: https://docs.python.org/3/tutorial/errors.html#handling-exceptions I thought it would. I wanted to keep the exact same exception to display in the status.
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.
🥇
What does this PR do?
Raise exception when openmetrics process method throws an exception, so the check reports it in the status of the agent.
Motivation
The integration reports OK even though there is a connection issue.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached