Azure / Azure/azure-functions-dotnet-worker

Improve extension startup error discoverability/logging

Open
#2,927 9 comments 0 reactions 0 assignees View on GitHub
area: sdk extensions pending-design supportability
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

The generated code from [this code generation template](https://github.com/Azure/azure-functions-dotnet-worker/blob/bf563c49c2f2ab20f6c2d5a56ae9915e87f2d2c6/sdk/Sdk.Generators/ExtensionStartupRunnerGenerator.cs#L214) is reporting the exception in the error stream but not passing it to the application (in this case the Azure Function) error handler. This caused me to waste few days chasing an issue where my function's failed to startup in the cloud. I couldn't find the issue until I downloaded the source code to my local machine and referenced the code directly in my solution to be able to debug locally and find what caused the failures.

This must remove the try/catch to allow developers more flexibility and control over their code.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with sdk/Sdk.Generators/ExtensionStartupRunnerGenerator.cs at the linked code around line 214 and inspect how generated extension-startup exceptions are handled. Verify whether the exception reaches the Azure Function application's error handler instead of only the error stream; done means startup failures remain discoverable through the application handler without the current try/catch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.