Azure / Azure/azure-functions-host
Overriding Configuration at Runtime for Linux Elastic Premium Plan does not work when using Environment variable with dot such as "Host.Triggers.DurableTask.AzureStorage"
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
When we add the below app setting to override monitoring configuration it does not work.
AzureFunctionsJobHost__logging__logLevel__Host.Triggers.DurableTask = Warning.
### **Expected Behavior :**
LoggerFilterOptions
{
"MinLevel": "None",
"Rules": [
{
"ProviderName": null,
"CategoryName": "Host.Triggers.DurableTask",
"LogLevel": "Warning",
"Filter": null
}
### **Actual Behavior:**
LoggerFilterOptions
{
"MinLevel": "None",
"Rules": [
{
"ProviderName": null,
"CategoryName": "Host_Triggers_DurableTask",
"LogLevel": "Warning",
"Filter": null
}
----------------------------------------------------------------------------------------------
So the . is replaced with _ for environment variable which is expected for this change done few years back.
[PR 1323668](https://msazure.visualstudio.com/One/_git/AAPT-Antares-Websites/commit/2726de3e4c4cadf9b21a5db78753b232d5db3872?refName=refs%2Fheads%2Fdev)
For this change host is not recognizing the environment variable as the category name to override (Host_Triggers_DurableTask versus Host.Triggers.DurableTask). The above change can't be reverted as . is not allowed character in Linux and was causing other conflicting issues.
Hence we need to make changes for the host to recognize environment variables with _ in Linux EP or Dedicated plan.
Contributor guide
Research direction
Start by reproducing the Linux Elastic Premium configuration with AzureFunctionsJobHost__logging__logLevel__Host.Triggers.DurableTask and compare the resulting LoggerFilterOptions with the expected category name. Trace how environment-variable underscores are mapped to logging category names; done when Linux EP or Dedicated plan settings recognize the intended Host.Triggers.DurableTask category without breaking the existing dot restriction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100