Skip to content

Commit 805357a

Browse files
Consume WebJobs diagnostics for Application Insights flushing issues (#8998)
* Subscribe to flushing issue messages from WebJobs.Logging.ApplicationInsights * Update release_notes.md * Add the AzureFunctions feed as a NuGet package source (#9167) * Add AzureFunctions as a package source * Correct view to be staging only * Update WebJobs.Logging.ApplicationInsights package
1 parent 9fc7fa5 commit 805357a

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<add key="azure_app_service_staging" value="https://www.myget.org/F/azure-appservice-staging/api/v2" />
77
<add key="azure-appservice-test" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/azure-appservice-test%40Local/nuget/v3/index.json" />
88
<add key="Microsoft.Azure.Functions.PowerShellWorker" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/Microsoft.Azure.Functions.PowerShellWorker/nuget/v3/index.json" />
9+
<add key="AzureFunctions@staging" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctions%40staging/nuget/v3/index.json" />
910
<add key="AzureFunctionsRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsRelease/nuget/v3/index.json" />
1011
<add key="AzureFunctionsPreRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsPreRelease/nuget/v3/index.json" />
1112
<!-- dotnet-tools is required for Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit -->

release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<!-- Please add your release notes in the following format:
44
- My change description (#PR)
55
-->
6+
7+
- Consume diagnostic events raised by the WebJobs SDK for Application Insights flushing issues: see [PR](https://github.com/Azure/azure-webjobs-sdk/pull/2939)
68
- Update Python Worker Version to [4.11.0](https://github.com/Azure/azure-functions-python-worker/releases/tag/4.11.0)
79
- Update Java Worker Version to [2.10.0](https://github.com/Azure/azure-functions-java-worker/releases/tag/2.10.0)
810
- Update PowerShell Worker 7.2 to 4.0.2719 [Release Note](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.2719)

src/WebJobs.Script.WebHost/Diagnostics/DiagnosticListenerService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Diagnostics;
77
using System.Threading;
88
using System.Threading.Tasks;
9+
using Microsoft.Azure.WebJobs.Logging.ApplicationInsights;
910
using Microsoft.Azure.WebJobs.Script.Config;
1011
using Microsoft.Azure.WebJobs.Script.Diagnostics;
1112
using Microsoft.Extensions.Hosting;
@@ -47,7 +48,8 @@ private void SubscribeListeners()
4748

4849
_allListenersSubscription = DiagnosticListener.AllListeners.Subscribe(delegate (DiagnosticListener listener)
4950
{
50-
if (listener.Name.StartsWith(ScriptConstants.HostDiagnosticSourcePrefix))
51+
if (listener.Name.StartsWith(ScriptConstants.HostDiagnosticSourcePrefix)
52+
|| listener.Name.StartsWith(ApplicationInsightsDiagnosticConstants.ApplicationInsightsDiagnosticSourcePrefix))
5153
{
5254
lock (_listenerSubscriptions)
5355
{
@@ -63,7 +65,7 @@ private void SubscribeListeners()
6365
_listenerSubscriptions.Add(listener.Name, listenerSubscription);
6466
}
6567

66-
_logger.LogInformation("Subscribed to host diagnostic source '{sourceName}'", listener.Name);
68+
_logger.LogInformation("Subscribed to diagnostic source '{sourceName}'", listener.Name);
6769
}
6870
}
6971
});

src/WebJobs.Script/WebJobs.Script.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />
6767
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Timers.Storage" Version="1.0.0-beta.1" />
6868
<PackageReference Include="Microsoft.Azure.WebJobs.Script.Abstractions" Version="1.0.4-preview" />
69-
<PackageReference Include="Microsoft.Azure.WebJobs.Logging.ApplicationInsights" Version="3.0.34" />
69+
<PackageReference Include="Microsoft.Azure.WebJobs.Logging.ApplicationInsights" Version="3.0.35" />
7070
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.3.1" />
7171
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
7272
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />

0 commit comments

Comments
 (0)