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

Distinguish between expected and unexpected failures #232

Open
idg10 opened this issue Jul 15, 2021 · 0 comments
Open

Distinguish between expected and unexpected failures #232

idg10 opened this issue Jul 15, 2021 · 0 comments

Comments

@idg10
Copy link
Contributor

idg10 commented Jul 15, 2021

Today, Menes always reports exceptions that emerge from service methods. However, it does not make it easy to distinguish between exceptions that are expected (e.g., throwing an OpenApiUnauthorizedException to produce a 401 response), and ones that we simply failed to anticipate.

These two cases require quite different responses. If an exception occurs that we were not expecting, we should investigate, because that sounds like a coding error. By contrast, an expected OpenApiUnauthorizedException looks like business as usual.

It is possible to detect these cases indirectly today in Application Insights by defining an alert that watches for 500 status codes in the HTTP response. And if you then go and look at that in Application Insights, the correlation ID should enable you to see more detail about the request, including the exception that led to the 500.

However, this is a somewhat indirect mechanism. It could be defeated if Application Insights has started to sample—we might end up knowing that a problem has occurred but be entirely unable to diagnose it. So it would be better to have a clear, unambiguous indication of this kind of problem.

This might require extensions to Corvus.Monitoring—we might want to add an abstraction analogous to Application Insights custom events.

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

No branches or pull requests

1 participant