Skip to content

Commit efd60f1

Browse files
authored
No longer build Logging projects in CI (#3152)
* Skip building of deprecated logging projects * Use AppInsights SDK in sample
1 parent acb721d commit efd60f1

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

eng/ci/templates/jobs/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ jobs:
6666
src\Microsoft.Azure.WebJobs\WebJobs.csproj
6767
src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.csproj
6868
src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.Sources.csproj
69-
src\Microsoft.Azure.WebJobs.Logging\WebJobs.Logging.csproj
70-
src\Microsoft.Azure.WebJobs.Logging.ApplicationInsights\WebJobs.Logging.ApplicationInsights.csproj
7169
src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj
7270
src\Microsoft.Azure.WebJobs.Rpc.Core\WebJobs.Rpc.Core.csproj
7371
src\Microsoft.Azure.WebJobs.Extensions.Rpc\WebJobs.Extensions.Rpc.csproj

eng/ci/templates/jobs/run-integration-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
arguments: -c $(configuration) --no-build
3131
projects: |
3232
test\Microsoft.Azure.WebJobs.Host.FunctionalTests\*.csproj
33-
test\Microsoft.Azure.WebJobs.Logging.FunctionalTests\*.csproj
3433
test\Microsoft.Azure.WebJobs.Host.EndToEndTests\*.csproj
3534
env:
3635
AzureWebJobsDashboard: $(Storage)

sample/SampleHost/Program.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,13 @@ public static async Task Main(string[] args)
3232
{
3333
b.SetMinimumLevel(LogLevel.Debug);
3434
b.AddConsole();
35-
36-
// If this key exists in any config, use it to enable App Insights
37-
string appInsightsKey = context.Configuration["APPINSIGHTS_INSTRUMENTATIONKEY"];
38-
if (!string.IsNullOrEmpty(appInsightsKey))
39-
{
40-
b.AddApplicationInsightsWebJobs(o => o.InstrumentationKey = appInsightsKey);
41-
}
4235
})
4336
.ConfigureServices(services =>
4437
{
4538
// add some sample services to demonstrate job class DI
4639
services.AddSingleton<ISampleServiceA, SampleServiceA>();
4740
services.AddSingleton<ISampleServiceB, SampleServiceB>();
41+
services.AddApplicationInsightsTelemetryWorkerService();
4842
})
4943
.UseConsoleLifetime();
5044

sample/SampleHost/SampleHost.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14+
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
1415
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="6.3.5" />
1516
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.16.4" />
1617
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.3" />
@@ -25,7 +26,6 @@
2526
<ItemGroup>
2627
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj" />
2728
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.csproj" />
28-
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Logging.ApplicationInsights\WebJobs.Logging.ApplicationInsights.csproj" />
2929
</ItemGroup>
3030

3131

0 commit comments

Comments
 (0)