Azure / Azure/azure-functions-host

Error handling improvements for LinuxAppServiceFileLogger

Open
#11,270 0 comments 0 reactions 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

For our Linux Dedicated SKUs, LinuxAppServiceFileLogger is used as part of the logging pipeline. It writes files out to disk, and other App Service platform components process those files and forward the logs on to the rest of the pipeline.

In the implementation, there are currently a few places where we swallow errors (e.g. [here](https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Diagnostics/LinuxAppServiceFileLogger.cs#L118) and [here](https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Diagnostics/LinuxAppServiceFileLogger.cs#L80)) if we're unable to process a log. This can result in lost logs of course. We should explore retries, or at least a mechanism by which we capture the error(s) that happened and log them the next time we can. This way we have system telemetry that indicates we're having logging failures.

This came up recently in a CRI: https://portal.microsofticm.com/imp/v5/incidents/details/672582739, and I'm including this issue as a repair item there.

Contributor guide

Open the contributing guide

Research direction

Start in src/WebJobs.Script.WebHost/Diagnostics/LinuxAppServiceFileLogger.cs, especially the error-handling paths around lines 80 and 118. Trace how failed log processing is currently swallowed and determine how retries or deferred error reporting should fit the logging pipeline. Done means failures are no longer silently lost and system telemetry records logging failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.