diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Controllers/ApprenticeFeedbackTargetController.cs b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Controllers/ApprenticeFeedbackTargetController.cs index 5942208869..1962061016 100644 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Controllers/ApprenticeFeedbackTargetController.cs +++ b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Controllers/ApprenticeFeedbackTargetController.cs @@ -34,6 +34,7 @@ public async Task GetFeedbackTargetsForUpdate(int batchSize) { try { + _logger.LogInformation("Getting feedback targets for update"); var result = await _mediator.Send(new GetFeedbackTargetsForUpdateQuery() { BatchSize = batchSize }); return Ok(result.FeedbackTargetsForUpdate); } diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Program.cs b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Program.cs index 1f16ae5f94..07be87ac5a 100644 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Program.cs +++ b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Program.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; -using NLog.Web; namespace SFA.DAS.ApprenticeFeedback.Api { @@ -16,7 +15,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); - }) - .UseNLog(); + }); } } diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/SFA.DAS.ApprenticeFeedback.Api.csproj b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/SFA.DAS.ApprenticeFeedback.Api.csproj index 894f70cdc4..52bf3e751b 100644 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/SFA.DAS.ApprenticeFeedback.Api.csproj +++ b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/SFA.DAS.ApprenticeFeedback.Api.csproj @@ -5,27 +5,9 @@ true - - - - - - - - nlog.config - true - - - nlog.config - true - - - - - @@ -34,12 +16,4 @@ - - - true - - - - - diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Startup.cs b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Startup.cs index 1c07a05511..e80a961eda 100644 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Startup.cs +++ b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/Startup.cs @@ -1,4 +1,3 @@ -using MediatR; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Authorization; @@ -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; @@ -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 => { diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/appsettings.json b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/appsettings.json index c9b5d6dd42..dba82bc707 100644 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/appsettings.json +++ b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/appsettings.json @@ -11,5 +11,5 @@ "ConfigNames": "SFA.DAS.ApprenticeFeedback.OuterApi", "Environment": "LOCAL", "Version": "1.0", - "APPINSIGHTS_INSTRUMENTATIONKEY": "" + "APPLICATIONINSIGHTS_CONNECTION_STRING": "" } diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Debug.config b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Debug.config deleted file mode 100644 index 7748f3a1fc..0000000000 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Debug.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Release.config b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Release.config deleted file mode 100644 index 669c075fdc..0000000000 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.Release.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.config b/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.config deleted file mode 100644 index f4f7f986bb..0000000000 --- a/src/ApprenticeFeedback/SFA.DAS.ApprenticeFeedback.Api/nlog.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file