Azure / Azure/azure-functions-host
Custom handler logs not shown if response is an error
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
I have a custom handler, and I'm trying to view logs in Application Insights. I always return logs (as a list of strings) with any internal handler. When I send a good request, I can all the logs associated with that call, but when I send a bad request, no logs return (even though I carefully set up logs as a part of the error response body with stack traces and everything). In fact, the logs are MORE important when sending an error code, and yet logs with errors aren't shown in any of the tutorials and I never see them in Application Insights; I just see "internal server error" with no extra information. Is this a problem with function apps or is there something I'm missing?
Contributor guide
Research direction
The report identifies custom handlers and Application Insights but no source file or test. Start by reproducing one successful and one error response while comparing the logs returned and those recorded in Application Insights; done means determining whether error-response logs are lost and documenting or fixing the observed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- backend, cloud, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100