In azure functions (v2, c#), there are two environment variables that can be potentially used to identify the name of the current environment.
AZURE_FUNCTIONS_ENVIRONMENTASPNETCORE_ENVIRONMENT
I am planning to use AZURE_FUNCTIONS_ENVIRONMENT, and I am wondering if there are reasons to choose one over another?
In terms of behavior of the two, this is what I discovered:
AZURE_FUNCTIONS_ENVIRONMENTis set toDevelopmentlocally by the functions host/runtime. It is not automatically set in azure toProduction. One can set this in App Settings in azure.ASPNETCORE_ENVIRONMENTis not set by the functions host/runtime either locally or in Azure.
I have also raised a github issue about this a couple of weeks ago, but got no response. I am hoping I might get an answer here.