Skip to content

Log process errors and exception details #8024

@liliankasem

Description

@liliankasem

When we get an error from the worker and process it through HandleWorkerProcessExitError, we don't get details about the exception, just that it's a
WorkerProcessExitException exception which is an exception we create OnProccssExited:

var processExitEx = new WorkerProcessExitException($"{Process.StartInfo.FileName} exited with code {Process.ExitCode}\n {exceptionMessage}");

Logs:

"Summary": Language Worker Process exited. Pid=3492.,
"Details": Microsoft.Azure.WebJobs.Script.Workers.WorkerProcessExitException : C:\Program Files (x86)\dotnet\dotnet.exe exited with code -532462766
.
.
.
"Summary": Handling WorkerErrorEvent for runtime:dotnet-isolated, workerId:dotnet-isolated. Failed with: Microsoft.Azure.WebJobs.Script.Workers.WorkerProcessExitException: C:\Program Files (x86)\dotnet\dotnet.exe exited with code -532462766
 ,
"Details": ,

User story: investigate and implement better logging for worker exceptions & log worker exceptions as errors

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions