I believe it's to do with a nuance between successfully (or unsuccessfully) handling the general mechanism of Requests/Responses (even though there were errors along the way during handling of requests) vs if the runtime was successful in handling the requests. Per Brett's comment on the answer to this post, please try passing in your Exception stack to your log.Error()
calls and see if that produces a more intuitive view for your Dashboard.
What defines a failed request in Azure Functions?

We recently had an issue where one of our functions encountered an internal error and returned HTTP 500 for some requests.
While troubleshooting, we were surprised to find that none of our dashboards or alerts had discovered this, because these invocations were not detected as failed, despite the fact that they returned HTTP 500. Here is an example screenshot from the "monitor" tab of the function itself in the portal:
This is a bit unexpected, and begs the question: what does an invocation need to do to be considered failed in Azure Functions?
Azure Monitor
Azure Functions
2 answers
Sort by: Most helpful
-
MikeUrnun 9,777 Reputation points Moderator
2021-04-15T22:57:02.01+00:00 -
Lalit 1 Reputation point
2021-08-11T16:01:08.5+00:00 @Daniel Rosenberg , Azure Functions does not follow HTTP semantics.
Success check for Azure Function is equivalent to "no exception thrown" and a Failed check is "exception thrown".
Raising an exception and not returning a HTTP response will mark the Function execution as "Fail". Hope this helps.