Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes nlog in favour of appinsights telemetry #1799

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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 @@ -34,6 +34,7 @@ public async Task<IActionResult> GetFeedbackTargetsForUpdate(int batchSize)
{
try
{
_logger.LogInformation("Getting feedback targets for update");
var result = await _mediator.Send(new GetFeedbackTargetsForUpdateQuery() { BatchSize = batchSize });
return Ok(result.FeedbackTargetsForUpdate);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using NLog.Web;

namespace SFA.DAS.ApprenticeFeedback.Api
{
Expand All @@ -16,7 +15,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseNLog();
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,9 @@
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>

<ItemGroup>
<Content Remove="nlog.Debug.config" />
<Content Remove="nlog.Release.config" />
</ItemGroup>

<ItemGroup>
<None Include="nlog.Debug.config">
<DependentUpon>nlog.config</DependentUpon>
<IsTransformFile>true</IsTransformFile>
</None>
<None Include="nlog.Release.config">
<DependentUpon>nlog.config</DependentUpon>
<IsTransformFile>true</IsTransformFile>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="MediatR" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="NLog.Web.AspNetCore" />
<PackageReference Include="SFA.DAS.NLog.Targets.Redis" />
<PackageReference Include="Swashbuckle.AspNetCore" />
</ItemGroup>

Expand All @@ -34,12 +16,4 @@
<ProjectReference Include="..\SFA.DAS.ApprenticeFeedback\SFA.DAS.ApprenticeFeedback.csproj" />
</ItemGroup>

<ItemGroup>
<Content Update="nlog.config">
<TransformOnBuild>true</TransformOnBuild>
</Content>
</ItemGroup>



</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using MediatR;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Authorization;
Expand All @@ -14,6 +13,7 @@
using SFA.DAS.SharedOuterApi.AppStart;
using SFA.DAS.SharedOuterApi.Infrastructure.HealthCheck;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
using SFA.DAS.SharedOuterApi.Apprentice.GovUK.Auth.Application.Commands;


Expand Down Expand Up @@ -77,7 +77,7 @@ public void ConfigureServices(IServiceCollection services)
options.LowercaseQueryStrings = true;
}).AddMvc();

services.AddApplicationInsightsTelemetry(_configuration["APPINSIGHTS_INSTRUMENTATIONKEY"]);
services.AddOpenTelemetryRegistration(_configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"]!);

services.AddSwaggerGen(c =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"ConfigNames": "SFA.DAS.ApprenticeFeedback.OuterApi",
"Environment": "LOCAL",
"Version": "1.0",
"APPINSIGHTS_INSTRUMENTATIONKEY": ""
"APPLICATIONINSIGHTS_CONNECTION_STRING": ""
}

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.config

This file was deleted.

Loading