Azure / Azure/azure-functions-host
Pass log-levels for Functions to the Language Worker
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### What problem would the feature you're requesting solve? Please describe.
Recently, we face an issue on the Python worker side when sending DEBUG level log to function host via GRPC channel. However, some third-party Python libraries abuse the DEBUG level (e.g. azure-servicebus). In azure-servicebus library, it sends 80+ DEBUG level log entries clogging the GRPC channel, stopping the worker from processing any future messages.
This issue occurs even before host can filtering the log messages.
#### Describe the solution you'd like
We should disable the worker log from its source.
When starting the worker process, the host can pass a `--log-level ` flag to the worker.exe process, and let the worker handle which level of log should be collected.
#### Describe alternatives you've considered
@pragnagopa mentions that in host.json, the user is able to control log level in each function and could be hard to control.
@vrdmr suggests the host can do a minimal aggregation for the log level `min(Function1LogLevel, Function2LogLevel)`.
@Hazhzeng suggests the host can pass the fine grain log level information and let the worker decides how to handle logging in each functions.
#### Additional context
cc: @anirudhgarg @brettsam @fabiocav @stefanushinardi
Contributor guide
Research direction
No files, tests, or concrete entry points are named. Start by tracing how the host starts the worker process and sends logs over the gRPC channel, then determine how the requested log-level flag should be passed and applied; done means worker-side filtering prevents excessive DEBUG messages before transmission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, python
- Domain
- backend, cloud, observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100