Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@

namespace FunctionsNetHost;

internal static class EnvironmentSettingNames
internal static class EnvironmentVariables
{
/// <summary>
/// Set value to "1" for enabling extra trace logs in FunctionsNetHost.
/// </summary>
internal const string FunctionsNetHostTrace = "AZURE_FUNCTIONS_FUNCTIONSNETHOST_TRACE";

/// <summary>
/// Application pool Id for the placeholder app. Only available in Windows(when running in IIS).
/// </summary>
internal const string AppPoolId = "APP_POOL_ID";
}
8 changes: 7 additions & 1 deletion host/src/FunctionsNetHost/Grpc/IncomingGrpcMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ private async Task Process(StreamingMessage msg)

Logger.LogTrace($"Will wait for worker loaded signal.");
WorkerLoadStatusSignalManager.Instance.Signal.WaitOne();
Logger.LogTrace($"Received worker loaded signal. Forwarding environment reload request to worker.");

var logMessage = $"FunctionApp assembly loaded successfully. ProcessId:{Environment.ProcessId}";
if (OperatingSystem.IsWindows())
Comment thread
kshyju marked this conversation as resolved.
{
logMessage += $", AppPoolId:{Environment.GetEnvironmentVariable(EnvironmentVariables.AppPoolId)}";
}
Logger.Log(logMessage);
Comment thread
safihamid marked this conversation as resolved.

await MessageChannel.Instance.SendInboundAsync(msg);
_specializationDone = true;
Expand Down
2 changes: 1 addition & 1 deletion host/src/FunctionsNetHost/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static bool IsTraceLogEnabled
{
get
{
return string.Equals(EnvironmentUtils.GetValue(EnvironmentSettingNames.FunctionsNetHostTrace), "1");
return string.Equals(EnvironmentUtils.GetValue(EnvironmentVariables.FunctionsNetHostTrace), "1");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<id>Microsoft.Azure.Functions.DotNetIsolatedNativeHost</id>
<title>Microsoft Azure Functions dotnet-isolated native host</title>
<tags>dotnet-isolated azure-functions azure</tags>
<version>1.0.3</version>
<version>1.0.4</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<projectUrl>https://github.com/Azure/azure-functions-dotnet-worker</projectUrl>
Expand Down