From 0f5a348e41ff7514392910126c3df91ef1c4709d Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 8 Sep 2020 15:23:58 -0700 Subject: [PATCH 01/19] bump version 2.16-beta1 (#2039) --- .props/_GlobalStaticVersion.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.props/_GlobalStaticVersion.props b/.props/_GlobalStaticVersion.props index d468f384fe..f4a7703359 100644 --- a/.props/_GlobalStaticVersion.props +++ b/.props/_GlobalStaticVersion.props @@ -11,9 +11,9 @@ Update for every public release. --> 2 - 15 + 16 0 - + beta1 nightly - 2020-04-13 + 2020-09-08 + + diff --git a/IntegrationTests.sln b/IntegrationTests.sln index 9c3a67ea30..466f2e8448 100644 --- a/IntegrationTests.sln +++ b/IntegrationTests.sln @@ -32,6 +32,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.2.1 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.3.1", "NETCORE\test\IntegrationTests.WebApp.3.1\IntegrationTests.WebApp.3.1.csproj", "{97F94E43-702E-49B0-8570-9EF7547E1FE0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.5.0", "NETCORE\test\IntegrationTests.WebApp.5.0\IntegrationTests.WebApp.5.0.csproj", "{2FF06805-B8B6-4B7D-8084-F6718F9C7054}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution NETCORE\src\Shared\Shared.projitems*{079e8118-28b3-4567-a384-ea337a0ed9fb}*SharedItemsImports = 5 @@ -93,6 +95,10 @@ Global {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Release|Any CPU.Build.0 = Release|Any CPU + {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NETCORE/.vsts/linux-build.yml b/NETCORE/.vsts/linux-build.yml index 444ecb2319..9f599d5ddf 100644 --- a/NETCORE/.vsts/linux-build.yml +++ b/NETCORE/.vsts/linux-build.yml @@ -1,13 +1,26 @@ -pool: - vmImage: 'ubuntu-16.04' - strategy: - matrix: - netcoreapp2_1: - framework: netcoreapp2.1 - netcoreapp3_1: - framework: netcoreapp3.1 - maxParallel: 2 + matrix: + linux_netcore2_1: + imageName: 'ubuntu-latest' + framework: netcoreapp2.1 + linux_netcore3_1: + imageName: 'ubuntu-latest' + framework: netcoreapp3.1 + linux_net5: + imageName: 'ubuntu-latest' + framework: net5.0 + windows_netcore2_1: + imageName: 'windows-latest' + framework: netcoreapp2.1 + windows_netcore3_1: + imageName: 'windows-latest' + framework: netcoreapp3.1 + windows_net5: + imageName: 'windows-latest' + framework: net5.0 + +pool: + vmImage: $(imageName) steps: @@ -21,10 +34,11 @@ steps: inputs: version: 3.1.301 -- task: CmdLine@2 - displayName: Run dotnet side by side. +- task: UseDotNet@2 + displayName: install dotnet 5 inputs: - script: rsync -a ${DOTNET_ROOT/3.1.301/2.1.807}/* $DOTNET_ROOT/ + version: 5.0.100-preview.8.20417.9 + includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: DotNetCoreCLI - Restore Solution @@ -46,7 +60,7 @@ steps: inputs: command: "test" projects: "NETCORE/test/**/IntegrationTests.Tests.csproj" - arguments: "--configuration Release --framework $(framework) --no-build -l trx" + arguments: "--configuration Release --framework $(framework) --no-build -l trx --blame-hang --blame-hang-dump-type full --blame-hang-timeout 300000" - task: DotNetCoreCLI@1 displayName: Functional MVC Tests $(framework) @@ -81,6 +95,12 @@ steps: testResultsFiles: "**/*.trx" failTaskOnFailedTests: true +# Enable if we have hangs, crashes in tests +#- task: PublishPipelineArtifact@1 +# inputs: +# targetPath: "NETCORE/test/IntegrationTests.Tests/TestResults/" +# artifactName: $(imageName).$(framework).dmp + #- task: DotNetCoreCLI@1 # displayName: Package Nuget # inputs: diff --git a/NETCORE/ApplicationInsights.AspNetCore.sln b/NETCORE/ApplicationInsights.AspNetCore.sln index 0554499b4c..99224fda53 100644 --- a/NETCORE/ApplicationInsights.AspNetCore.sln +++ b/NETCORE/ApplicationInsights.AspNetCore.sln @@ -65,6 +65,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.3.1 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.2.1", "test\IntegrationTests.WebApp.2.1\IntegrationTests.WebApp.2.1.csproj", "{78A86267-EBB6-4720-8AC8-102B47D26D21}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests.WebApp.5.0", "test\IntegrationTests.WebApp.5.0\IntegrationTests.WebApp.5.0.csproj", "{851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\BASE\src\Common\Common\Common.projitems*{0c91d961-b21e-4760-a192-14193f10b831}*SharedItemsImports = 5 @@ -156,6 +158,10 @@ Global {78A86267-EBB6-4720-8AC8-102B47D26D21}.Debug|Any CPU.Build.0 = Debug|Any CPU {78A86267-EBB6-4720-8AC8-102B47D26D21}.Release|Any CPU.ActiveCfg = Release|Any CPU {78A86267-EBB6-4720-8AC8-102B47D26D21}.Release|Any CPU.Build.0 = Release|Any CPU + {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -181,6 +187,7 @@ Global {E78404EA-CBAA-4366-B659-C3A46BC9DF15} = {8B5230E5-8138-44D6-839F-DF9248F195EE} {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB} = {8B5230E5-8138-44D6-839F-DF9248F195EE} {78A86267-EBB6-4720-8AC8-102B47D26D21} = {8B5230E5-8138-44D6-839F-DF9248F195EE} + {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57} = {8B5230E5-8138-44D6-839F-DF9248F195EE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {047855A4-470F-43B1-8B74-69651DD6B8A6} diff --git a/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj b/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj index e4135902e8..a91e2e2435 100644 --- a/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj +++ b/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj @@ -9,26 +9,38 @@ --> - netcoreapp2.1;netcoreapp3.1 + netcoreapp2.1;netcoreapp3.1;net5.0 - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive + - - - - + + + PreserveNewest + + + + + + + - - - - - + + + + + + + + + + diff --git a/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs index b133ed6ed4..b5e8d1659a 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs @@ -3,18 +3,20 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; -#if NETCOREAPP2_1 -using IntegrationTests.WebApp._2._1; -#else +#if NET5_0 +using IntegrationTests.WebApp._5._0; +#elif NETCOREAPP3_1 using IntegrationTests.WebApp._3._1; +#else +using IntegrationTests.WebApp._2._1; #endif + namespace IntegrationTests.Tests { public partial class RequestCollectionTest : IClassFixture> @@ -46,7 +48,7 @@ public async Task RequestSuccess() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -81,7 +83,7 @@ public async Task RequestSuccessActionWithParameter() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -121,7 +123,7 @@ public async Task RequestFailed() // Assert Assert.Equal(HttpStatusCode.InternalServerError, response.StatusCode); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -162,7 +164,7 @@ public async Task RequestNonExistentPage() // Assert Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -181,7 +183,7 @@ public async Task RequestNonExistentPage() expectedSuccess: false); } - private void WaitForTelemetryToArrive() + private async Task WaitForTelemetryToArrive() { // The response to the test server request is completed // before the actual telemetry is sent from HostingDiagnosticListener. @@ -189,7 +191,7 @@ private void WaitForTelemetryToArrive() // sent to the user until TrackRequest() is called.) // The simplest workaround is to do a wait here. // This could be improved when entire functional tests are migrated to use this pattern. - Task.Delay(1000).Wait(); + await Task.Delay(1000); } private void ValidateRequest(RequestTelemetry requestTelemetry, diff --git a/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs index 2b5465cb61..6993e82e7d 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs @@ -9,10 +9,12 @@ using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; -#if NETCOREAPP2_1 -using IntegrationTests.WebApp._2._1; -#else +#if NET5_0 +using IntegrationTests.WebApp._5._0; +#elif NETCOREAPP3_1 using IntegrationTests.WebApp._3._1; +#else +using IntegrationTests.WebApp._2._1; #endif namespace IntegrationTests.Tests @@ -41,7 +43,7 @@ public async Task RequestSuccessWithTraceParent() this.output.WriteLine(await response.Content.ReadAsStringAsync()); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -91,7 +93,7 @@ public async Task RequestFailedWithTraceParent() // Assert Assert.Equal(HttpStatusCode.InternalServerError, response.StatusCode); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); Assert.Equal(2, items.Count); @@ -139,7 +141,7 @@ public async Task RequestSuccessWithW3CCompatibleRequestId() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); // 1 Trace from Ilogger, 1 Request @@ -189,7 +191,7 @@ public async Task RequestFailedWithW3CCompatibleRequestId() // Assert Assert.Equal(HttpStatusCode.InternalServerError, response.StatusCode); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); Assert.Equal(2, items.Count); @@ -237,7 +239,7 @@ public async Task RequestSuccessWithNonW3CCompatibleRequestId() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); // 1 Trace from Ilogger, 1 Request diff --git a/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs index b1d1b0d558..7e676cba71 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs @@ -13,10 +13,12 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.ApplicationInsights; -#if NETCOREAPP2_1 -using IntegrationTests.WebApp._2._1; -#else +#if NET5_0 +using IntegrationTests.WebApp._5._0; +#elif NETCOREAPP3_1 using IntegrationTests.WebApp._3._1; +#else +using IntegrationTests.WebApp._2._1; #endif namespace IntegrationTests.Tests @@ -27,12 +29,15 @@ public partial class RequestCollectionTest : IClassFixture builder.ConfigureTestServices((services) => services.AddLogging(logBuilder => logBuilder.AddFilter(loggerCategory, LogLevel.Information)) @@ -49,7 +54,7 @@ public async Task RequestILoggerUserConfigOverRidesDefaultLevel() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); @@ -93,7 +98,7 @@ public async Task IloggerWarningOrAboveCapturedByDefault() // Assert response.EnsureSuccessStatusCode(); - WaitForTelemetryToArrive(); + await WaitForTelemetryToArrive(); var items = _factory.sentItems; PrintItems(items); diff --git a/NETCORE/test/IntegrationTests.Tests/xunit.runner.json b/NETCORE/test/IntegrationTests.Tests/xunit.runner.json new file mode 100644 index 0000000000..c90d9b18ba --- /dev/null +++ b/NETCORE/test/IntegrationTests.Tests/xunit.runner.json @@ -0,0 +1,4 @@ +{ + "maxParallelThreads": 1, + "parallelizeTestCollections": false +} \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Controllers/HomeController.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Controllers/HomeController.cs new file mode 100644 index 0000000000..6bcb12c0de --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Controllers/HomeController.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using IntegrationTests.WebApp._5._0.Models; + +namespace IntegrationTests.WebApp._5._0.Controllers +{ + public class HomeController : Controller + { + private readonly ILogger _logger; + + public HomeController(ILogger logger) + { + _logger = logger; + } + + public IActionResult Index() + { + _logger.LogWarning("sample warning"); + _logger.LogInformation("sample information"); + return View(); + } + + public IActionResult Privacy() + { + return View(); + } + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + throw new Exception("sample exception"); + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj b/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj new file mode 100644 index 0000000000..3babc4bcb9 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj @@ -0,0 +1,12 @@ + + + + net5.0 + IntegrationTests.WebApp._5._0 + + + + + + + diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs new file mode 100644 index 0000000000..10ee92d137 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs @@ -0,0 +1,11 @@ +using System; + +namespace IntegrationTests.WebApp._5._0.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs new file mode 100644 index 0000000000..8d1859e571 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace IntegrationTests.WebApp._5._0 +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json b/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json new file mode 100644 index 0000000000..9f8dc09555 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:20513", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IntegrationTests.WebApp._5._0": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs new file mode 100644 index 0000000000..6e82719ac1 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace IntegrationTests.WebApp._5._0 +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllersWithViews(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + } + app.UseStaticFiles(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml new file mode 100644 index 0000000000..d2d19bdf9f --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Welcome

+

Learn about building Web apps with ASP.NET Core.

+
diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml new file mode 100644 index 0000000000..af4fb195a3 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml new file mode 100644 index 0000000000..a1e04783c6 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000000..016f94b04a --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml @@ -0,0 +1,48 @@ + + + + + + @ViewData["Title"] - IntegrationTests.WebApp._5._0 + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2020 - IntegrationTests.WebApp._5._0 - Privacy +
+
+ + + + @await RenderSectionAsync("Scripts", required: false) + + diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000000..5a16d80a9a --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml new file mode 100644 index 0000000000..87e690adfe --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using IntegrationTests.WebApp._5._0 +@using IntegrationTests.WebApp._5._0.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml new file mode 100644 index 0000000000..a5f10045db --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json new file mode 100644 index 0000000000..8983e0fc1c --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json new file mode 100644 index 0000000000..d9d9a9bff6 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css b/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css new file mode 100644 index 0000000000..e679a8ea7f --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css @@ -0,0 +1,71 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +/* Provide sufficient contrast against white background */ +a { + color: #0366d6; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + font-size: 14px; +} +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + position: relative; + min-height: 100%; +} + +body { + /* Margin bottom by footer height */ + margin-bottom: 60px; +} +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; /* Vertically center the text there */ +} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/favicon.ico b/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..63e859b476eff5055e0e557aaa151ca8223fbeef GIT binary patch literal 5430 zcmc&&Yj2xp8Fqnv;>&(QB_ve7>^E#o2mu=cO~A%R>DU-_hfbSRv1t;m7zJ_AMrntN zy0+^f&8be>q&YYzH%(88lQ?#KwiCzaCO*ZEo%j&v;<}&Lj_stKTKK>#U3nin@AF>w zb3ONSAFR{u(S1d?cdw53y}Gt1b-Hirbh;;bm(Rcbnoc*%@jiaXM|4jU^1WO~`TYZ~ zC-~jh9~b-f?fX`DmwvcguQzn*uV}c^Vd&~?H|RUs4Epv~gTAfR(B0lT&?RWQOtduM z^1vUD9{HQsW!{a9|0crA34m7Z6lpG^}f6f?={zD+ zXAzk^i^aKN_}s2$eX81wjSMONE#WVdzf|MT)Ap*}Vsn!XbvsI#6o&ij{87^d%$|A{ z=F{KB%)g%@z76yBzbb7seW**Ju8r4e*Z3PWNX3_tTDgzZatz7)Q6ytwB%@&@A|XT; zecM`Snxx5po$C)%yCP!KEtos~eOS)@2=kX-RIm)4glMCoagTEFxrBeSX%Euz734Fk z%7)x(k~T!@Hbg_37NSQL!vlTBXoURS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$+dIlNFPAe+tN=FOYU z{A&Fg|H73+w1IK(W=j*L>JQgz$g0 z7JpKXLHIh}#$wm|N`s}o-@|L_`>*(gTQ~)wr3Eap7g%PVNisKw82im;Gdv#85x#s+ zoqqtnwu4ycd>cOQgRh-=aEJbnvVK`}ja%+FZx}&ehtX)n(9nVfe4{mn0bgijUbNr7Tf5X^$*{qh2%`?--%+sbSrjE^;1e3>% zqa%jdY16{Y)a1hSy*mr0JGU05Z%=qlx5vGvTjSpTt6k%nR06q}1DU`SQh_ZAeJ}A@`hL~xvv05U?0%=spP`R>dk?cOWM9^KNb7B?xjex>OZo%JMQQ1Q zB|q@}8RiP@DWn-(fB;phPaIOP2Yp)XN3-Fsn)S3w($4&+p8f5W_f%gac}QvmkHfCj$2=!t`boCvQ zCW;&Dto=f8v##}dy^wg3VNaBy&kCe3N;1|@n@pUaMPT?(aJ9b*(gJ28$}(2qFt$H~u5z94xcIQkcOI++)*exzbrk?WOOOf*|%k5#KV zL=&ky3)Eirv$wbRJ2F2s_ILQY--D~~7>^f}W|Aw^e7inXr#WLI{@h`0|jHud2Y~cI~Yn{r_kU^Vo{1gja - + From 0c5cd658495f78f3b70fd2db6207ba31c702371f Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 14 Sep 2020 23:24:37 -0700 Subject: [PATCH 04/19] EventCounterCollector removes AggregationInterval as a dimension to the metric. (#2050) --- CHANGELOG.md | 2 +- .../EventCounterCollector/EventCounterListener.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 282ede8c03..e5dd7f8af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## Version 2.15.0 -- no changes since beta. +- EventCounterCollector module does not add AggregationInterval as a dimension to the metric. ## Version 2.15.0-beta3 - [Support Request.PathBase for AspNetCore telemetry](https://github.com/microsoft/ApplicationInsights-dotnet/pull/1983) diff --git a/WEB/Src/EventCounterCollector/EventCounterCollector/EventCounterListener.cs b/WEB/Src/EventCounterCollector/EventCounterCollector/EventCounterListener.cs index c87c49b3e1..f17a962183 100644 --- a/WEB/Src/EventCounterCollector/EventCounterCollector/EventCounterListener.cs +++ b/WEB/Src/EventCounterCollector/EventCounterCollector/EventCounterListener.cs @@ -255,7 +255,6 @@ private void ExtractAndPostMetric(string eventSourceName, IDictionary Date: Tue, 15 Sep 2020 18:05:32 -0300 Subject: [PATCH 05/19] Merging IntegrationTests.WebApp projects (#2051) updating IntegrationTests.sln --- IntegrationTests.sln | 22 +--- NETCORE/ApplicationInsights.AspNetCore.sln | 26 ++--- .../IntegrationTests.Tests.csproj | 5 +- .../RequestCollectionTest.cs | 46 ++++++--- .../RequestCorrelationHeaderTest.cs | 27 ++--- .../RequestILoggerTest.cs | 33 +++--- .../Controllers/HomeController.cs | 53 ---------- .../IntegrationTests.WebApp.2.1/Program.cs | 24 ----- .../Views/Home/About.cshtml | 7 -- .../Views/Home/Contact.cshtml | 17 ---- .../Views/Home/Index.cshtml | 94 ------------------ .../Views/Home/Privacy.cshtml | 6 -- .../Views/Shared/Error.cshtml | 22 ---- .../Views/Shared/_CookieConsentPartial.cshtml | 41 -------- .../Views/Shared/_Layout.cshtml | 74 -------------- .../Shared/_ValidationScriptsPartial.cshtml | 18 ---- .../Views/_ViewImports.cshtml | 3 - .../Views/_ViewStart.cshtml | 3 - .../wwwroot/css/site.css | 37 ------- .../wwwroot/css/site.min.css | 1 - .../wwwroot/favicon.ico | Bin 32038 -> 0 bytes .../wwwroot/images/banner1.svg | 1 - .../wwwroot/images/banner2.svg | 1 - .../wwwroot/images/banner3.svg | 1 - .../wwwroot/js/site.js | 4 - .../wwwroot/js/site.min.js | 0 .../Controllers/HomeController.cs | 39 -------- .../IntegrationTests.WebApp.3.1.csproj | 12 --- .../Models/ErrorViewModel.cs | 11 -- .../IntegrationTests.WebApp.3.1/Program.cs | 26 ----- .../Properties/launchSettings.json | 27 ----- .../Views/Home/Index.cshtml | 8 -- .../Views/Home/Privacy.cshtml | 6 -- .../Views/Shared/Error.cshtml | 25 ----- .../Views/Shared/_Layout.cshtml | 48 --------- .../Shared/_ValidationScriptsPartial.cshtml | 2 - .../Views/_ViewImports.cshtml | 3 - .../Views/_ViewStart.cshtml | 3 - .../appsettings.Development.json | 9 -- .../appsettings.json | 10 -- .../wwwroot/css/site.css | 71 ------------- .../wwwroot/favicon.ico | Bin 32038 -> 0 bytes .../wwwroot/js/site.js | 4 - .../Controllers/HomeController.cs | 40 -------- .../IntegrationTests.WebApp.5.0.csproj | 12 --- .../Models/ErrorViewModel.cs | 11 -- .../IntegrationTests.WebApp.5.0/Program.cs | 26 ----- .../Properties/launchSettings.json | 28 ------ .../Views/Home/Index.cshtml | 8 -- .../Views/Home/Privacy.cshtml | 6 -- .../Views/Shared/Error.cshtml | 25 ----- .../Views/Shared/_Layout.cshtml | 48 --------- .../Shared/_ValidationScriptsPartial.cshtml | 2 - .../Views/_ViewImports.cshtml | 3 - .../Views/_ViewStart.cshtml | 3 - .../appsettings.Development.json | 9 -- .../appsettings.json | 10 -- .../wwwroot/css/site.css | 71 ------------- .../wwwroot/favicon.ico | Bin 5430 -> 0 bytes .../wwwroot/js/site.js | 4 - .../Controllers/HomeController.cs | 52 ++++++++++ .../IntegrationTests.WebApp.csproj} | 10 +- .../Models/ErrorViewModel.cs | 2 +- .../test/IntegrationTests.WebApp/Program.cs | 51 ++++++++++ .../Properties/launchSettings.json | 4 +- .../Startup.net5.0.cs} | 9 +- .../Startup.netcoreapp2.1.cs} | 12 +-- .../Startup.netcoreapp3.1.cs} | 9 +- .../appsettings.Development.json | 0 .../appsettings.json | 0 70 files changed, 197 insertions(+), 1128 deletions(-) delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Controllers/HomeController.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Program.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/About.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Contact.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Index.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Privacy.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/Error.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_CookieConsentPartial.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_Layout.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_ValidationScriptsPartial.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewImports.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewStart.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.css delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.min.css delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/favicon.ico delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner1.svg delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner2.svg delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner3.svg delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.js delete mode 100644 NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.min.js delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Controllers/HomeController.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/IntegrationTests.WebApp.3.1.csproj delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Models/ErrorViewModel.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Program.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Properties/launchSettings.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Index.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Privacy.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/Error.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_Layout.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_ValidationScriptsPartial.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewImports.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewStart.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.Development.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/css/site.css delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/favicon.ico delete mode 100644 NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/js/site.js delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Controllers/HomeController.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/favicon.ico delete mode 100644 NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/js/site.js create mode 100644 NETCORE/test/IntegrationTests.WebApp/Controllers/HomeController.cs rename NETCORE/test/{IntegrationTests.WebApp.2.1/IntegrationTests.WebApp.2.1.csproj => IntegrationTests.WebApp/IntegrationTests.WebApp.csproj} (75%) rename NETCORE/test/{IntegrationTests.WebApp.2.1 => IntegrationTests.WebApp}/Models/ErrorViewModel.cs (79%) create mode 100644 NETCORE/test/IntegrationTests.WebApp/Program.cs rename NETCORE/test/{IntegrationTests.WebApp.2.1 => IntegrationTests.WebApp}/Properties/launchSettings.json (88%) rename NETCORE/test/{IntegrationTests.WebApp.5.0/Startup.cs => IntegrationTests.WebApp/Startup.net5.0.cs} (90%) rename NETCORE/test/{IntegrationTests.WebApp.2.1/Startup.cs => IntegrationTests.WebApp/Startup.netcoreapp2.1.cs} (90%) rename NETCORE/test/{IntegrationTests.WebApp.3.1/Startup.cs => IntegrationTests.WebApp/Startup.netcoreapp3.1.cs} (89%) rename NETCORE/test/{IntegrationTests.WebApp.2.1 => IntegrationTests.WebApp}/appsettings.Development.json (100%) rename NETCORE/test/{IntegrationTests.WebApp.2.1 => IntegrationTests.WebApp}/appsettings.json (100%) diff --git a/IntegrationTests.sln b/IntegrationTests.sln index 466f2e8448..8a8914f9d0 100644 --- a/IntegrationTests.sln +++ b/IntegrationTests.sln @@ -28,11 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer", "WEB\Src\Wi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryChannel", "BASE\src\ServerTelemetryChannel\TelemetryChannel.csproj", "{893DFA71-0F4F-4BBF-AE8F-72208BE237BA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.2.1", "NETCORE\test\IntegrationTests.WebApp.2.1\IntegrationTests.WebApp.2.1.csproj", "{FB0D665A-FB75-487C-9164-57023369527F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.3.1", "NETCORE\test\IntegrationTests.WebApp.3.1\IntegrationTests.WebApp.3.1.csproj", "{97F94E43-702E-49B0-8570-9EF7547E1FE0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.5.0", "NETCORE\test\IntegrationTests.WebApp.5.0\IntegrationTests.WebApp.5.0.csproj", "{2FF06805-B8B6-4B7D-8084-F6718F9C7054}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp", "NETCORE\test\IntegrationTests.WebApp\IntegrationTests.WebApp.csproj", "{B0899552-34A3-4BFB-8502-F966BF409FDA}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -87,18 +83,10 @@ Global {893DFA71-0F4F-4BBF-AE8F-72208BE237BA}.Debug|Any CPU.Build.0 = Debug|Any CPU {893DFA71-0F4F-4BBF-AE8F-72208BE237BA}.Release|Any CPU.ActiveCfg = Release|Any CPU {893DFA71-0F4F-4BBF-AE8F-72208BE237BA}.Release|Any CPU.Build.0 = Release|Any CPU - {FB0D665A-FB75-487C-9164-57023369527F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB0D665A-FB75-487C-9164-57023369527F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB0D665A-FB75-487C-9164-57023369527F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB0D665A-FB75-487C-9164-57023369527F}.Release|Any CPU.Build.0 = Release|Any CPU - {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {97F94E43-702E-49B0-8570-9EF7547E1FE0}.Release|Any CPU.Build.0 = Release|Any CPU - {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2FF06805-B8B6-4B7D-8084-F6718F9C7054}.Release|Any CPU.Build.0 = Release|Any CPU + {B0899552-34A3-4BFB-8502-F966BF409FDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0899552-34A3-4BFB-8502-F966BF409FDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0899552-34A3-4BFB-8502-F966BF409FDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0899552-34A3-4BFB-8502-F966BF409FDA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NETCORE/ApplicationInsights.AspNetCore.sln b/NETCORE/ApplicationInsights.AspNetCore.sln index 99224fda53..59df6988bd 100644 --- a/NETCORE/ApplicationInsights.AspNetCore.sln +++ b/NETCORE/ApplicationInsights.AspNetCore.sln @@ -61,11 +61,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests.MVC.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests.WebApi.Tests", "test\FunctionalTests.WebApi.Tests\FunctionalTests.WebApi.Tests.csproj", "{E78404EA-CBAA-4366-B659-C3A46BC9DF15}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.3.1", "test\IntegrationTests.WebApp.3.1\IntegrationTests.WebApp.3.1.csproj", "{2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests.WebApp.2.1", "test\IntegrationTests.WebApp.2.1\IntegrationTests.WebApp.2.1.csproj", "{78A86267-EBB6-4720-8AC8-102B47D26D21}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests.WebApp.5.0", "test\IntegrationTests.WebApp.5.0\IntegrationTests.WebApp.5.0.csproj", "{851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests.WebApp", "test\IntegrationTests.WebApp\IntegrationTests.WebApp.csproj", "{AFB5577E-1560-468C-91C7-042080202478}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -150,18 +146,10 @@ Global {E78404EA-CBAA-4366-B659-C3A46BC9DF15}.Debug|Any CPU.Build.0 = Debug|Any CPU {E78404EA-CBAA-4366-B659-C3A46BC9DF15}.Release|Any CPU.ActiveCfg = Release|Any CPU {E78404EA-CBAA-4366-B659-C3A46BC9DF15}.Release|Any CPU.Build.0 = Release|Any CPU - {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB}.Release|Any CPU.Build.0 = Release|Any CPU - {78A86267-EBB6-4720-8AC8-102B47D26D21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78A86267-EBB6-4720-8AC8-102B47D26D21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78A86267-EBB6-4720-8AC8-102B47D26D21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78A86267-EBB6-4720-8AC8-102B47D26D21}.Release|Any CPU.Build.0 = Release|Any CPU - {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57}.Release|Any CPU.Build.0 = Release|Any CPU + {AFB5577E-1560-468C-91C7-042080202478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFB5577E-1560-468C-91C7-042080202478}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFB5577E-1560-468C-91C7-042080202478}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFB5577E-1560-468C-91C7-042080202478}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -185,9 +173,7 @@ Global {63F64005-CDC7-4062-8CBC-A40B049E342A} = {8B5230E5-8138-44D6-839F-DF9248F195EE} {9693CC30-A3E6-48A7-A68E-6E0DD098D779} = {8B5230E5-8138-44D6-839F-DF9248F195EE} {E78404EA-CBAA-4366-B659-C3A46BC9DF15} = {8B5230E5-8138-44D6-839F-DF9248F195EE} - {2EB6FF02-DB25-423A-A8FC-1E249BE4CEDB} = {8B5230E5-8138-44D6-839F-DF9248F195EE} - {78A86267-EBB6-4720-8AC8-102B47D26D21} = {8B5230E5-8138-44D6-839F-DF9248F195EE} - {851ECB16-8469-4D92-B6B8-B6F3DC3A4C57} = {8B5230E5-8138-44D6-839F-DF9248F195EE} + {AFB5577E-1560-468C-91C7-042080202478} = {8B5230E5-8138-44D6-839F-DF9248F195EE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {047855A4-470F-43B1-8B74-69651DD6B8A6} diff --git a/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj b/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj index a91e2e2435..07d919488b 100644 --- a/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj +++ b/NETCORE/test/IntegrationTests.Tests/IntegrationTests.Tests.csproj @@ -19,6 +19,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + +
@@ -28,17 +30,14 @@ - - - diff --git a/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs index b5e8d1659a..8dfc0059cd 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestCollectionTest.cs @@ -1,4 +1,5 @@ -using Microsoft.ApplicationInsights.Channel; +using IntegrationTests.WebApp; +using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.DataContracts; using System; using System.Collections.Concurrent; @@ -8,24 +9,37 @@ using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; + +namespace IntegrationTests.Tests +{ + public partial class RequestCollectionTest : #if NET5_0 -using IntegrationTests.WebApp._5._0; + IClassFixture> #elif NETCOREAPP3_1 -using IntegrationTests.WebApp._3._1; + IClassFixture> #else -using IntegrationTests.WebApp._2._1; + IClassFixture> #endif - - -namespace IntegrationTests.Tests -{ - public partial class RequestCollectionTest : IClassFixture> { - private readonly CustomWebApplicationFactory _factory; - protected readonly ITestOutputHelper output; +#if NET5_0 + private readonly CustomWebApplicationFactory _factory; +#elif NETCOREAPP3_1 + private readonly CustomWebApplicationFactory _factory; +#else + private readonly CustomWebApplicationFactory _factory; +#endif + protected readonly ITestOutputHelper output; - public RequestCollectionTest(CustomWebApplicationFactory factory, ITestOutputHelper output) + public RequestCollectionTest(CustomWebApplicationFactory< + #if NET5_0 + Startup_net_5_0 +#elif NETCOREAPP3_1 + Startup_netcoreapp_3_1 +#else + Startup_netcoreapp_2_1 +#endif + > factory, ITestOutputHelper output) { this.output = output; _factory = factory; @@ -37,7 +51,7 @@ public async Task RequestSuccess() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Privacy"; + var path = "Home/Empty"; var url = client.BaseAddress + path; // Act @@ -71,8 +85,8 @@ public async Task RequestSuccessActionWithParameter() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Index/5"; - var expectedName = "GET Home/Index [id]"; + var path = "Home/5"; + var expectedName = "GET Home/Get [id]"; var url = client.BaseAddress + path; // Act @@ -153,7 +167,7 @@ public async Task RequestNonExistentPage() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Nonexistent"; + var path = "Nonexistent"; var url = client.BaseAddress + path; // Act diff --git a/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs index 6993e82e7d..476d148f84 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestCorrelationHeaderTest.cs @@ -9,24 +9,25 @@ using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; +using IntegrationTests.WebApp; + +namespace IntegrationTests.Tests +{ + public partial class RequestCollectionTest : #if NET5_0 -using IntegrationTests.WebApp._5._0; + IClassFixture> #elif NETCOREAPP3_1 -using IntegrationTests.WebApp._3._1; + IClassFixture> #else -using IntegrationTests.WebApp._2._1; + IClassFixture> #endif - -namespace IntegrationTests.Tests -{ - public partial class RequestCollectionTest : IClassFixture> { [Fact] public async Task RequestSuccessWithTraceParent() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Index"; + var path = "Home"; var url = client.BaseAddress + path; // Act @@ -67,7 +68,7 @@ public async Task RequestSuccessWithTraceParent() ValidateRequest( requestTelemetry: req, expectedResponseCode: "200", - expectedName: "GET " + path, + expectedName: "GET " + path + "/Get", expectedUrl: url, expectedSuccess: true); } @@ -125,7 +126,7 @@ public async Task RequestSuccessWithW3CCompatibleRequestId() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Index"; + var path = "Home"; var url = client.BaseAddress + path; // Act @@ -165,7 +166,7 @@ public async Task RequestSuccessWithW3CCompatibleRequestId() ValidateRequest( requestTelemetry: req, expectedResponseCode: "200", - expectedName: "GET " + path, + expectedName: "GET " + path + "/Get", expectedUrl: url, expectedSuccess: true); } @@ -223,7 +224,7 @@ public async Task RequestSuccessWithNonW3CCompatibleRequestId() { // Arrange var client = _factory.CreateClient(); - var path = "Home/Index"; + var path = "Home"; var url = client.BaseAddress + path; // Act @@ -264,7 +265,7 @@ public async Task RequestSuccessWithNonW3CCompatibleRequestId() ValidateRequest( requestTelemetry: req, expectedResponseCode: "200", - expectedName: "GET " + path, + expectedName: "GET " + path + "/Get", expectedUrl: url, expectedSuccess: true); } diff --git a/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs b/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs index 7e676cba71..13c7f03da0 100644 --- a/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs +++ b/NETCORE/test/IntegrationTests.Tests/RequestILoggerTest.cs @@ -13,37 +13,31 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.ApplicationInsights; +using IntegrationTests.WebApp; + +namespace IntegrationTests.Tests +{ + public partial class RequestCollectionTest : #if NET5_0 -using IntegrationTests.WebApp._5._0; + IClassFixture> #elif NETCOREAPP3_1 -using IntegrationTests.WebApp._3._1; + IClassFixture> #else -using IntegrationTests.WebApp._2._1; + IClassFixture> #endif - -namespace IntegrationTests.Tests -{ - public partial class RequestCollectionTest : IClassFixture> { [Fact] public async Task RequestILoggerUserConfigOverRidesDefaultLevel() { // Arrange -#if NET5_0 - var loggerCategory = "IntegrationTests.WebApp._5._0.Controllers.HomeController"; -#elif NETCOREAPP3_1 - var loggerCategory = "IntegrationTests.WebApp._3._1.Controllers.HomeController"; -#else - var loggerCategory = "IntegrationTests.WebApp._2._1.Controllers.HomeController"; -#endif - + var loggerCategory = "IntegrationTests.WebApp.Controllers.HomeController"; var client = _factory.WithWebHostBuilder(builder => builder.ConfigureTestServices((services) => services.AddLogging(logBuilder => logBuilder.AddFilter(loggerCategory, LogLevel.Information)) )).CreateClient(); - var path = "Home/Index"; + var path = "Home"; var url = client.BaseAddress + path; // Act @@ -74,7 +68,7 @@ public async Task RequestILoggerUserConfigOverRidesDefaultLevel() ValidateRequest( requestTelemetry: req, expectedResponseCode: "200", - expectedName: "GET " + path, + expectedName: "GET " + path + "/Get", expectedUrl: url, expectedSuccess: true); @@ -87,7 +81,7 @@ public async Task IloggerWarningOrAboveCapturedByDefault() // Arrange var client = _factory.CreateClient(); - var path = "Home/Index"; + var path = "Home"; var url = client.BaseAddress + path; // Act @@ -117,11 +111,10 @@ public async Task IloggerWarningOrAboveCapturedByDefault() ValidateRequest( requestTelemetry: req, expectedResponseCode: "200", - expectedName: "GET " + path, + expectedName: "GET " + path + "/Get", expectedUrl: url, expectedSuccess: true); } - } } diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Controllers/HomeController.cs b/NETCORE/test/IntegrationTests.WebApp.2.1/Controllers/HomeController.cs deleted file mode 100644 index c6b59ca0eb..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Controllers/HomeController.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using IntegrationTests.WebApp._2._1.Models; - -namespace IntegrationTests.WebApp._2._1.Controllers -{ - public class HomeController : Controller - { - private readonly ILogger _logger; - - public HomeController(ILogger logger) - { - _logger = logger; - } - - public IActionResult Index(int index) - { - _logger.LogWarning("sample warning"); - _logger.LogInformation("sample information"); - return View(); - } - - public IActionResult About() - { - ViewData["Message"] = "Your application description page."; - - return View(); - } - - public IActionResult Contact() - { - ViewData["Message"] = "Your contact page."; - - return View(); - } - - public IActionResult Privacy() - { - return View(); - } - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - throw new Exception("sample exception"); - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Program.cs b/NETCORE/test/IntegrationTests.WebApp.2.1/Program.cs deleted file mode 100644 index 0fb8206738..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace IntegrationTests.WebApp._2._1 -{ - public class Program - { - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/About.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/About.cshtml deleted file mode 100644 index 3674e37a86..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/About.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@{ - ViewData["Title"] = "About"; -} -

@ViewData["Title"]

-

@ViewData["Message"]

- -

Use this area to provide additional information.

diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Contact.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Contact.cshtml deleted file mode 100644 index a11a1867cf..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Contact.cshtml +++ /dev/null @@ -1,17 +0,0 @@ -@{ - ViewData["Title"] = "Contact"; -} -

@ViewData["Title"]

-

@ViewData["Message"]

- -
- One Microsoft Way
- Redmond, WA 98052-6399
- P: - 425.555.0100 -
- -
- Support: Support@example.com
- Marketing: Marketing@example.com -
diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Index.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Index.cshtml deleted file mode 100644 index f42d2a08bd..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Index.cshtml +++ /dev/null @@ -1,94 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - - - - diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Privacy.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Privacy.cshtml deleted file mode 100644 index 7bd38619c6..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.

diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/Error.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/Error.cshtml deleted file mode 100644 index ec2ea6bd03..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/Error.cshtml +++ /dev/null @@ -1,22 +0,0 @@ -@model ErrorViewModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. -

diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_CookieConsentPartial.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_CookieConsentPartial.cshtml deleted file mode 100644 index bbfbb09acb..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_CookieConsentPartial.cshtml +++ /dev/null @@ -1,41 +0,0 @@ -@using Microsoft.AspNetCore.Http.Features - -@{ - var consentFeature = Context.Features.Get(); - var showBanner = !consentFeature?.CanTrack ?? false; - var cookieString = consentFeature?.CreateConsentCookie(); -} - -@if (showBanner) -{ - - -} \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_Layout.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_Layout.cshtml deleted file mode 100644 index 724540b08e..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - @ViewData["Title"] - IntegrationTests.WebApp._2._1 - - - - - - - - - - - - - - - -
- @RenderBody() -
-
-

© 2020 - IntegrationTests.WebApp._2._1

-
-
- - - - - - - - - - - - - @RenderSection("Scripts", required: false) - - diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_ValidationScriptsPartial.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_ValidationScriptsPartial.cshtml deleted file mode 100644 index 2a9241f596..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/Shared/_ValidationScriptsPartial.cshtml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewImports.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewImports.cshtml deleted file mode 100644 index d13fd601c2..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using IntegrationTests.WebApp._2._1 -@using IntegrationTests.WebApp._2._1.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewStart.cshtml b/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewStart.cshtml deleted file mode 100644 index a5f10045db..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.css b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.css deleted file mode 100644 index e89c7811cd..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.css +++ /dev/null @@ -1,37 +0,0 @@ -/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\ -for details on configuring this project to bundle and minify static web assets. */ -body { - padding-top: 50px; - padding-bottom: 20px; -} - -/* Wrapping element */ -/* Set some basic padding to keep content from hitting the edges */ -.body-content { - padding-left: 15px; - padding-right: 15px; -} - -/* Carousel */ -.carousel-caption p { - font-size: 20px; - line-height: 1.4; -} - -/* Make .svg files in the carousel display properly in older browsers */ -.carousel-inner .item img[src$=".svg"] { - width: 100%; -} - -/* QR code generator */ -#qrCode { - margin: 15px; -} - -/* Hide/rearrange for smaller screens */ -@media screen and (max-width: 767px) { - /* Hide captions */ - .carousel-caption { - display: none; - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.min.css b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.min.css deleted file mode 100644 index 5e93e30ae3..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/css/site.min.css +++ /dev/null @@ -1 +0,0 @@ -body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}} \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/favicon.ico b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/favicon.ico deleted file mode 100644 index a3a799985c43bc7309d701b2cad129023377dc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$QFr9nPg(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$FXNPolgyr1XGt$^lFPF}rmBF5rj1Kh5%dforrP8W}_qJL$2qMBS-#%-|s#BPZBSETsn_EBYcr(W5dq( z@f%}C|iN7)YN`^)h7R?Cg}Do*w-!zwZb9=BMp%Wsh@nb22hA zA{`wa8Q;yz6S)zfo%sl08^GF`9csI9BlGnEy#0^Y3b);M+n<(}6jziM7nhe57a1rj zC@(2ISYBL^U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cPrBpmHRtmd zI2Jng0J=bXK);YY^rM?jzn?~X-Pe`GbAy{D)Y6D&1GY-EBcy%Bq?bKh?A>DD9DD!p z?{q02wno2sraGUkZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_ \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner2.svg b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner2.svg deleted file mode 100644 index 9679c604d0..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner3.svg b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner3.svg deleted file mode 100644 index 38b3d7cd1f..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/images/banner3.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.js b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.js deleted file mode 100644 index ac49c18641..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.js +++ /dev/null @@ -1,4 +0,0 @@ -// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification -// for details on configuring this project to bundle and minify static web assets. - -// Write your JavaScript code. diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.min.js b/NETCORE/test/IntegrationTests.WebApp.2.1/wwwroot/js/site.min.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Controllers/HomeController.cs b/NETCORE/test/IntegrationTests.WebApp.3.1/Controllers/HomeController.cs deleted file mode 100644 index 064a121144..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Controllers/HomeController.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using IntegrationTests.WebApp._3._1.Models; - -namespace IntegrationTests.WebApp._3._1.Controllers -{ - public class HomeController : Controller - { - private readonly ILogger _logger; - - public HomeController(ILogger logger) - { - _logger = logger; - } - - public IActionResult Index(int index) - { - _logger.LogWarning("sample warning"); - _logger.LogInformation("sample information"); - return View(); - } - - public IActionResult Privacy() - { - return View(); - } - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - throw new Exception("sample exception"); - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/IntegrationTests.WebApp.3.1.csproj b/NETCORE/test/IntegrationTests.WebApp.3.1/IntegrationTests.WebApp.3.1.csproj deleted file mode 100644 index c23704a32d..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/IntegrationTests.WebApp.3.1.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netcoreapp3.1 - IntegrationTests.WebApp._3._1 - - - - - - - diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Models/ErrorViewModel.cs b/NETCORE/test/IntegrationTests.WebApp.3.1/Models/ErrorViewModel.cs deleted file mode 100644 index 0c9d0683de..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Models/ErrorViewModel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace IntegrationTests.WebApp._3._1.Models -{ - public class ErrorViewModel - { - public string RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Program.cs b/NETCORE/test/IntegrationTests.WebApp.3.1/Program.cs deleted file mode 100644 index 233b929db3..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace IntegrationTests.WebApp._3._1 -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Properties/launchSettings.json b/NETCORE/test/IntegrationTests.WebApp.3.1/Properties/launchSettings.json deleted file mode 100644 index 631f472e21..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:2060", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IntegrationTests.WebApp._3._1": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Index.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Index.cshtml deleted file mode 100644 index d2d19bdf9f..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Index.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

-
diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Privacy.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Privacy.cshtml deleted file mode 100644 index af4fb195a3..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.

diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/Error.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/Error.cshtml deleted file mode 100644 index a1e04783c6..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/Error.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@model ErrorViewModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_Layout.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_Layout.cshtml deleted file mode 100644 index 02bb6de074..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - @ViewData["Title"] - IntegrationTests.WebApp._3._1 - - - - -
- -
-
-
- @RenderBody() -
-
- -
-
- © 2020 - IntegrationTests.WebApp._3._1 - Privacy -
-
- - - - @RenderSection("Scripts", required: false) - - diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_ValidationScriptsPartial.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_ValidationScriptsPartial.cshtml deleted file mode 100644 index 5a16d80a9a..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/Shared/_ValidationScriptsPartial.cshtml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewImports.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewImports.cshtml deleted file mode 100644 index ae52d49a80..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using IntegrationTests.WebApp._3._1 -@using IntegrationTests.WebApp._3._1.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewStart.cshtml b/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewStart.cshtml deleted file mode 100644 index a5f10045db..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.Development.json b/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.Development.json deleted file mode 100644 index 8983e0fc1c..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.json b/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.json deleted file mode 100644 index d9d9a9bff6..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/css/site.css b/NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/css/site.css deleted file mode 100644 index e679a8ea7f..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/css/site.css +++ /dev/null @@ -1,71 +0,0 @@ -/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification -for details on configuring this project to bundle and minify static web assets. */ - -a.navbar-brand { - white-space: normal; - text-align: center; - word-break: break-all; -} - -/* Provide sufficient contrast against white background */ -a { - color: #0366d6; -} - -.btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} - -.nav-pills .nav-link.active, .nav-pills .show > .nav-link { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} - -/* Sticky footer styles --------------------------------------------------- */ -html { - font-size: 14px; -} -@media (min-width: 768px) { - html { - font-size: 16px; - } -} - -.border-top { - border-top: 1px solid #e5e5e5; -} -.border-bottom { - border-bottom: 1px solid #e5e5e5; -} - -.box-shadow { - box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); -} - -button.accept-policy { - font-size: 1rem; - line-height: inherit; -} - -/* Sticky footer styles --------------------------------------------------- */ -html { - position: relative; - min-height: 100%; -} - -body { - /* Margin bottom by footer height */ - margin-bottom: 60px; -} -.footer { - position: absolute; - bottom: 0; - width: 100%; - white-space: nowrap; - line-height: 60px; /* Vertically center the text there */ -} diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/favicon.ico b/NETCORE/test/IntegrationTests.WebApp.3.1/wwwroot/favicon.ico deleted file mode 100644 index a3a799985c43bc7309d701b2cad129023377dc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$QFr9nPg(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$FXNPolgyr1XGt$^lFPF}rmBF5rj1Kh5%dforrP8W}_qJL$2q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gBndn?3sNKYKCQFU4LGKJ$n@Je$&w9@E$X z^p@iJ(v&`1(tq~1zc>0Vow-KR&vm!GUzT?Eqgnc)leZ9p)-Z*C!zqb=-$XG0 z^!8RfuQs5s>Q~qcz92(a_Q+KH?C*vCTr~UdTiR`JGuNH8v(J|FTiSEcPrBpmHRtmd zI2Jng0J=bXK);YY^rM?jzn?~X-Pe`GbAy{D)Y6D&1GY-EBcy%Bq?bKh?A>DD9DD!p z?{q02wno2sraGUkZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_ _logger; - - public HomeController(ILogger logger) - { - _logger = logger; - } - - public IActionResult Index() - { - _logger.LogWarning("sample warning"); - _logger.LogInformation("sample information"); - return View(); - } - - public IActionResult Privacy() - { - return View(); - } - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - throw new Exception("sample exception"); - return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj b/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj deleted file mode 100644 index 3babc4bcb9..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/IntegrationTests.WebApp.5.0.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net5.0 - IntegrationTests.WebApp._5._0 - - - - - - - diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs deleted file mode 100644 index 10ee92d137..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Models/ErrorViewModel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace IntegrationTests.WebApp._5._0.Models -{ - public class ErrorViewModel - { - public string RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs b/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs deleted file mode 100644 index 8d1859e571..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace IntegrationTests.WebApp._5._0 -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json b/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json deleted file mode 100644 index 9f8dc09555..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:20513", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IntegrationTests.WebApp._5._0": { - "commandName": "Project", - "dotnetRunMessages": "true", - "launchBrowser": true, - "applicationUrl": "http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml deleted file mode 100644 index d2d19bdf9f..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Index.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

-
diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml deleted file mode 100644 index af4fb195a3..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.

diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml deleted file mode 100644 index a1e04783c6..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/Error.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@model ErrorViewModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml deleted file mode 100644 index 016f94b04a..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - @ViewData["Title"] - IntegrationTests.WebApp._5._0 - - - - -
- -
-
-
- @RenderBody() -
-
- -
-
- © 2020 - IntegrationTests.WebApp._5._0 - Privacy -
-
- - - - @await RenderSectionAsync("Scripts", required: false) - - diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml deleted file mode 100644 index 5a16d80a9a..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/Shared/_ValidationScriptsPartial.cshtml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml deleted file mode 100644 index 87e690adfe..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using IntegrationTests.WebApp._5._0 -@using IntegrationTests.WebApp._5._0.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml b/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml deleted file mode 100644 index a5f10045db..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json deleted file mode 100644 index 8983e0fc1c..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json b/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json deleted file mode 100644 index d9d9a9bff6..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css b/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css deleted file mode 100644 index e679a8ea7f..0000000000 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/css/site.css +++ /dev/null @@ -1,71 +0,0 @@ -/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification -for details on configuring this project to bundle and minify static web assets. */ - -a.navbar-brand { - white-space: normal; - text-align: center; - word-break: break-all; -} - -/* Provide sufficient contrast against white background */ -a { - color: #0366d6; -} - -.btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} - -.nav-pills .nav-link.active, .nav-pills .show > .nav-link { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} - -/* Sticky footer styles --------------------------------------------------- */ -html { - font-size: 14px; -} -@media (min-width: 768px) { - html { - font-size: 16px; - } -} - -.border-top { - border-top: 1px solid #e5e5e5; -} -.border-bottom { - border-bottom: 1px solid #e5e5e5; -} - -.box-shadow { - box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); -} - -button.accept-policy { - font-size: 1rem; - line-height: inherit; -} - -/* Sticky footer styles --------------------------------------------------- */ -html { - position: relative; - min-height: 100%; -} - -body { - /* Margin bottom by footer height */ - margin-bottom: 60px; -} -.footer { - position: absolute; - bottom: 0; - width: 100%; - white-space: nowrap; - line-height: 60px; /* Vertically center the text there */ -} diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/favicon.ico b/NETCORE/test/IntegrationTests.WebApp.5.0/wwwroot/favicon.ico deleted file mode 100644 index 63e859b476eff5055e0e557aaa151ca8223fbeef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmc&&Yj2xp8Fqnv;>&(QB_ve7>^E#o2mu=cO~A%R>DU-_hfbSRv1t;m7zJ_AMrntN zy0+^f&8be>q&YYzH%(88lQ?#KwiCzaCO*ZEo%j&v;<}&Lj_stKTKK>#U3nin@AF>w zb3ONSAFR{u(S1d?cdw53y}Gt1b-Hirbh;;bm(Rcbnoc*%@jiaXM|4jU^1WO~`TYZ~ zC-~jh9~b-f?fX`DmwvcguQzn*uV}c^Vd&~?H|RUs4Epv~gTAfR(B0lT&?RWQOtduM z^1vUD9{HQsW!{a9|0crA34m7Z6lpG^}f6f?={zD+ zXAzk^i^aKN_}s2$eX81wjSMONE#WVdzf|MT)Ap*}Vsn!XbvsI#6o&ij{87^d%$|A{ z=F{KB%)g%@z76yBzbb7seW**Ju8r4e*Z3PWNX3_tTDgzZatz7)Q6ytwB%@&@A|XT; zecM`Snxx5po$C)%yCP!KEtos~eOS)@2=kX-RIm)4glMCoagTEFxrBeSX%Euz734Fk z%7)x(k~T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4GO&w;+39A3f8w{{Q7eg|$+dIlNFPAe+tN=FOYU z{A&Fg|H73+w1IK(W=j*L>JQgz$g0 z7JpKXLHIh}#$wm|N`s}o-@|L_`>*(gTQ~)wr3Eap7g%PVNisKw82im;Gdv#85x#s+ zoqqtnwu4ycd>cOQgRh-=aEJbnvVK`}ja%+FZx}&ehtX)n(9nVfe4{mn0bgijUbNr7Tf5X^$*{qh2%`?--%+sbSrjE^;1e3>% zqa%jdY16{Y)a1hSy*mr0JGU05Z%=qlx5vGvTjSpTt6k%nR06q}1DU`SQh_ZAeJ}A@`hL~xvv05U?0%=spP`R>dk?cOWM9^KNb7B?xjex>OZo%JMQQ1Q zB|q@}8RiP@DWn-(fB;phPaIOP2Yp)XN3-Fsn)S3w($4&+p8f5W_f%gac}QvmkHfCj$2=!t`boCvQ zCW;&Dto=f8v##}dy^wg3VNaBy&kCe3N;1|@n@pUaMPT?(aJ9b*(gJ28$}(2qFt$H~u5z94xcIQkcOI++)*exzbrk?WOOOf*|%k5#KV zL=&ky3)Eirv$wbRJ2F2s_ILQY--D~~7>^f}W|Aw^e7inXr#WLI{@h`0|jHud2Y~cI~Yn{r_kU^Vo{1gja _logger; + + public HomeController(ILogger logger) + { + _logger = logger; + } + + // GET api/values + [HttpGet] + public ActionResult Get() + { + _logger.LogWarning("sample warning"); + _logger.LogInformation("sample information"); + return new OkResult(); + } + + // GET api/values/5 + [HttpGet("{id}")] + public ActionResult Get(int id) + { + _logger.LogWarning("sample warning"); + _logger.LogInformation("sample information"); + return "value"; + } + + [HttpGet("Empty")] + public ActionResult Empty() + { + return new OkResult(); + } + + [HttpGet("Error")] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public ActionResult Error() + { + throw new Exception("sample exception"); + } + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/IntegrationTests.WebApp.2.1.csproj b/NETCORE/test/IntegrationTests.WebApp/IntegrationTests.WebApp.csproj similarity index 75% rename from NETCORE/test/IntegrationTests.WebApp.2.1/IntegrationTests.WebApp.2.1.csproj rename to NETCORE/test/IntegrationTests.WebApp/IntegrationTests.WebApp.csproj index c75bd1a97c..21c5412c2e 100644 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/IntegrationTests.WebApp.2.1.csproj +++ b/NETCORE/test/IntegrationTests.WebApp/IntegrationTests.WebApp.csproj @@ -1,16 +1,16 @@ - netcoreapp2.1 + netcoreapp2.1;netcoreapp3.1;net5.0 - - + - - + + + diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Models/ErrorViewModel.cs b/NETCORE/test/IntegrationTests.WebApp/Models/ErrorViewModel.cs similarity index 79% rename from NETCORE/test/IntegrationTests.WebApp.2.1/Models/ErrorViewModel.cs rename to NETCORE/test/IntegrationTests.WebApp/Models/ErrorViewModel.cs index ff87a892a3..a8756107c5 100644 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Models/ErrorViewModel.cs +++ b/NETCORE/test/IntegrationTests.WebApp/Models/ErrorViewModel.cs @@ -1,6 +1,6 @@ using System; -namespace IntegrationTests.WebApp._2._1.Models +namespace IntegrationTests.WebApp.Models { public class ErrorViewModel { diff --git a/NETCORE/test/IntegrationTests.WebApp/Program.cs b/NETCORE/test/IntegrationTests.WebApp/Program.cs new file mode 100644 index 0000000000..fbd8f73320 --- /dev/null +++ b/NETCORE/test/IntegrationTests.WebApp/Program.cs @@ -0,0 +1,51 @@ +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; + +namespace IntegrationTests.WebApp +{ + public class Program + { +#if NETCOREAPP2_1 + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); +#elif NET5_0 + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); +#else + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); +#endif + } +} diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Properties/launchSettings.json b/NETCORE/test/IntegrationTests.WebApp/Properties/launchSettings.json similarity index 88% rename from NETCORE/test/IntegrationTests.WebApp.2.1/Properties/launchSettings.json rename to NETCORE/test/IntegrationTests.WebApp/Properties/launchSettings.json index 7beb76991f..900deab936 100644 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Properties/launchSettings.json +++ b/NETCORE/test/IntegrationTests.WebApp/Properties/launchSettings.json @@ -1,7 +1,7 @@ { "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, + "windowsAuthentication": false, + "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:2469", "sslPort": 0 diff --git a/NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs b/NETCORE/test/IntegrationTests.WebApp/Startup.net5.0.cs similarity index 90% rename from NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs rename to NETCORE/test/IntegrationTests.WebApp/Startup.net5.0.cs index 6e82719ac1..50a1d6cf8a 100644 --- a/NETCORE/test/IntegrationTests.WebApp.5.0/Startup.cs +++ b/NETCORE/test/IntegrationTests.WebApp/Startup.net5.0.cs @@ -1,3 +1,4 @@ +#if NET5_0 using System; using System.Collections.Generic; using System.Linq; @@ -8,11 +9,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace IntegrationTests.WebApp._5._0 +namespace IntegrationTests.WebApp { - public class Startup + public class Startup_net_5_0 { - public Startup(IConfiguration configuration) + public Startup_net_5_0(IConfiguration configuration) { Configuration = configuration; } @@ -36,7 +37,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseExceptionHandler("/Home/Error"); } - app.UseStaticFiles(); app.UseRouting(); @@ -51,3 +51,4 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) } } } +#endif \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/Startup.cs b/NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp2.1.cs similarity index 90% rename from NETCORE/test/IntegrationTests.WebApp.2.1/Startup.cs rename to NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp2.1.cs index 59f6b46369..9d6dc02b34 100644 --- a/NETCORE/test/IntegrationTests.WebApp.2.1/Startup.cs +++ b/NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp2.1.cs @@ -1,4 +1,5 @@ -using System; +#if NETCOREAPP2_1 +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -9,11 +10,11 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -namespace IntegrationTests.WebApp._2._1 +namespace IntegrationTests.WebApp { - public class Startup + public class Startup_netcoreapp_2_1 { - public Startup(IConfiguration configuration) + public Startup_netcoreapp_2_1(IConfiguration configuration) { Configuration = configuration; } @@ -30,7 +31,6 @@ public void ConfigureServices(IServiceCollection services) options.MinimumSameSitePolicy = SameSiteMode.None; }); - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } @@ -46,7 +46,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) app.UseExceptionHandler("/Home/Error"); } - app.UseStaticFiles(); app.UseCookiePolicy(); app.UseMvc(routes => @@ -58,3 +57,4 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) } } } +#endif \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.3.1/Startup.cs b/NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp3.1.cs similarity index 89% rename from NETCORE/test/IntegrationTests.WebApp.3.1/Startup.cs rename to NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp3.1.cs index 2430be6266..cd8e20445f 100644 --- a/NETCORE/test/IntegrationTests.WebApp.3.1/Startup.cs +++ b/NETCORE/test/IntegrationTests.WebApp/Startup.netcoreapp3.1.cs @@ -1,3 +1,4 @@ +#if NETCOREAPP3_1 using System; using System.Collections.Generic; using System.Linq; @@ -8,11 +9,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace IntegrationTests.WebApp._3._1 +namespace IntegrationTests.WebApp { - public class Startup + public class Startup_netcoreapp_3_1 { - public Startup(IConfiguration configuration) + public Startup_netcoreapp_3_1(IConfiguration configuration) { Configuration = configuration; } @@ -36,7 +37,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseExceptionHandler("/Home/Error"); } - app.UseStaticFiles(); app.UseRouting(); @@ -51,3 +51,4 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) } } } +#endif \ No newline at end of file diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/appsettings.Development.json b/NETCORE/test/IntegrationTests.WebApp/appsettings.Development.json similarity index 100% rename from NETCORE/test/IntegrationTests.WebApp.2.1/appsettings.Development.json rename to NETCORE/test/IntegrationTests.WebApp/appsettings.Development.json diff --git a/NETCORE/test/IntegrationTests.WebApp.2.1/appsettings.json b/NETCORE/test/IntegrationTests.WebApp/appsettings.json similarity index 100% rename from NETCORE/test/IntegrationTests.WebApp.2.1/appsettings.json rename to NETCORE/test/IntegrationTests.WebApp/appsettings.json From 80324905f5cd969517d4fc8b2374c35b67d9cfd9 Mon Sep 17 00:00:00 2001 From: Ramjot Singh Date: Mon, 21 Sep 2020 18:49:04 -0700 Subject: [PATCH 06/19] =?UTF-8?q?Emit=20stack=20trace=20when=20TrackExcept?= =?UTF-8?q?ionsAsExceptionTelemetry=20is=20set=20to=20f=E2=80=A6=20(#2065)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Emit stack trace when TrackExceptionsAsExceptionTelemetry is set to false * Updating tests * Updating ChangeLog * Taking PR comments * Adding stack trace comparisons * Updating test * Removing unneeded line --- CHANGELOG.md | 2 +- .../src/ILogger/ApplicationInsightsLogger.cs | 1 + .../ILogger.Tests/ILoggerIntegrationTests.cs | 26 +++++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5dd7f8af0..a80ced0e81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## VNext - +- [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065) ## Version 2.15.0 - EventCounterCollector module does not add AggregationInterval as a dimension to the metric. diff --git a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs index 074a5c4c00..ce0a79793f 100644 --- a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs +++ b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs @@ -97,6 +97,7 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except if (exception != null) { traceTelemetry.Properties.Add("ExceptionMessage", exception.Message); + traceTelemetry.Properties.Add("ExceptionStackTrace", exception.ToInvariantString()); } this.telemetryClient.TrackTrace(traceTelemetry); diff --git a/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs b/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs index 7110ef9c6f..1a5918964c 100644 --- a/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs +++ b/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs @@ -10,6 +10,7 @@ namespace Microsoft.ApplicationInsights using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.DataContracts; using Microsoft.ApplicationInsights.Extensibility; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.ApplicationInsights; @@ -121,7 +122,17 @@ public void ApplicationInsightsLoggerLogsExceptionAsTraceWhenSwitchIsFalse() ILogger testLogger = serviceProvider.GetRequiredService>(); testLogger.LogInformation("Testing"); - testLogger.LogError(new Exception("ExceptionMessage"), "LoggerMessage"); + + Exception trackingException = null; + try + { + ThrowException(); + } + catch (Exception ex) + { + trackingException = ex; + testLogger.LogError(ex, "LoggerMessage"); + } Assert.IsInstanceOfType(itemsReceived[0], typeof(TraceTelemetry)); Assert.IsInstanceOfType(itemsReceived[1], typeof(TraceTelemetry)); @@ -132,7 +143,18 @@ public void ApplicationInsightsLoggerLogsExceptionAsTraceWhenSwitchIsFalse() Assert.AreEqual(SeverityLevel.Error, (itemsReceived[1] as TraceTelemetry).SeverityLevel); Assert.AreEqual("LoggerMessage", (itemsReceived[1] as TraceTelemetry).Message); - Assert.AreEqual("ExceptionMessage", (itemsReceived[1] as TraceTelemetry).Properties["ExceptionMessage"]); + Assert.IsTrue((itemsReceived[1] as TraceTelemetry).Properties["ExceptionMessage"].Contains("StackTraceEnabled")); + + Assert.IsTrue((itemsReceived[1] as TraceTelemetry).Properties.ContainsKey("ExceptionStackTrace")); + + Assert.AreEqual( + trackingException.ToInvariantString(), + (itemsReceived[1] as TraceTelemetry).Properties["ExceptionStackTrace"]); + + void ThrowException() + { + throw new Exception("StackTraceEnabled"); + } } /// From 004dbd78cecd9a380688288d8a89e152e2e819c6 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Wed, 23 Sep 2020 17:00:41 -0300 Subject: [PATCH 07/19] Updating CodeAnalysis Nuget (#2059) * Updating CodeAnalysis Nuget fixing fxcop errors fixing fxcop errors adding ignore to ca1805 and ca1834 disabling ca1829 as well Revert "fixing fxcop errors" This reverts commit f070a0b8206dbee8351e4a82b37ea2098c9ff4e5. merge merge updating ruleset * adding message to ruleset * fixing rule CA1836 * fixing fxcop CA1829 and CA1834 besides two suppressions in code --- .props/Product.props | 4 ++-- .rulesets/ApplicationInsightsSDKRules.ruleset | 2 ++ .../ConcurrentDatastructures/MultidimensionalCube2.cs | 4 ++++ .../Metrics/MetricIdentifier.cs | 10 +++++----- .../Implementation/TransmissionStorage.cs | 4 ++-- .../AzureSdk/AzureSdkDiagnosticsEventHandler.cs | 2 +- .../PerformanceCollector/PerformanceCollectorModule.cs | 2 ++ .../WindowsServer/Implementation/MetricManager.cs | 2 +- 8 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.props/Product.props b/.props/Product.props index d0d515155b..235d988380 100644 --- a/.props/Product.props +++ b/.props/Product.props @@ -16,14 +16,14 @@ All - + All all runtime; build; native; contentfiles; analyzers - + All diff --git a/.rulesets/ApplicationInsightsSDKRules.ruleset b/.rulesets/ApplicationInsightsSDKRules.ruleset index 110173a43f..c9845014d5 100644 --- a/.rulesets/ApplicationInsightsSDKRules.ruleset +++ b/.rulesets/ApplicationInsightsSDKRules.ruleset @@ -31,6 +31,8 @@ + + diff --git a/BASE/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs b/BASE/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs index 70a56ed151..ee309bff09 100644 --- a/BASE/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs +++ b/BASE/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs @@ -258,7 +258,11 @@ private static string BuildPointMoniker(string[] coordinates) if (i > 0) { +#pragma warning disable CA1834 // Consider using 'StringBuilder.Append(char)' when applicable + // TODO: check if we can change from string to char, this will have some work + // since it's used as separator in split and contains builder.Append(PointMonikerSeparator); +#pragma warning restore CA1834 // Consider using 'StringBuilder.Append(char)' when applicable } builder.Append(coordinates[i]); diff --git a/BASE/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs b/BASE/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs index 2e8d33dd06..69b304da00 100644 --- a/BASE/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs +++ b/BASE/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs @@ -640,14 +640,14 @@ private string GetIdentifierString() idStr.Append(MetricIdentifier.NoNamespaceIdentifierStringComponent); } - idStr.Append("+"); + idStr.Append('+'); idStr.Append(this.MetricId); - idStr.Append("["); + idStr.Append('['); idStr.Append(this.DimensionsCount); - idStr.Append("]"); + idStr.Append(']'); - idStr.Append("("); + idStr.Append('('); for (int d = 1; d <= this.DimensionsCount; d++) { @@ -661,7 +661,7 @@ private string GetIdentifierString() idStr.Append('"'); } - idStr.Append(")"); + idStr.Append(')'); return idStr.ToString(); } diff --git a/BASE/src/ServerTelemetryChannel/Implementation/TransmissionStorage.cs b/BASE/src/ServerTelemetryChannel/Implementation/TransmissionStorage.cs index 3290e9852d..c8d88a4e7a 100644 --- a/BASE/src/ServerTelemetryChannel/Implementation/TransmissionStorage.cs +++ b/BASE/src/ServerTelemetryChannel/Implementation/TransmissionStorage.cs @@ -269,11 +269,11 @@ private IPlatformFile GetOldestTransmissionFileOrNull() private void LoadFilesOrderedByDateFromFolder() { - if (this.files.Count == 0) + if (this.files.IsEmpty) { lock (this.loadFilesLock) { - if (this.files.Count == 0) + if (this.files.IsEmpty) { // Sleep a tiny bit before (re)loading the list so that any other thread still processing // a file has time to finish and delete it so that it does not get re-added to the new list. diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkDiagnosticsEventHandler.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkDiagnosticsEventHandler.cs index 2852315b7d..4a25454a48 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkDiagnosticsEventHandler.cs +++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkDiagnosticsEventHandler.cs @@ -369,7 +369,7 @@ private static void PopulateLinks(IEnumerable links, OperationTelemetr linksJson.Remove(linksJson.Length - 1, 1); } - linksJson.Append("]"); + linksJson.Append(']'); telemetry.Properties["_MS.links"] = linksJson.ToString(); } } diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs b/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs index 2ff57cc97f..5f7e2f0dc2 100644 --- a/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs +++ b/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs @@ -272,7 +272,9 @@ private void TimerCallback(object state) stopwatch.Stop(); PerformanceCollectorEventSource.Log.CounterCollectionSuccessEvent( +#pragma warning disable CA1829 // Use Length/Count property instead of Count() when available results.LongCount(), +#pragma warning restore CA1829 // Use Length/Count property instead of Count() when available stopwatch.ElapsedMilliseconds); foreach (var result in results) diff --git a/WEB/Src/WindowsServer/WindowsServer/Implementation/MetricManager.cs b/WEB/Src/WindowsServer/WindowsServer/Implementation/MetricManager.cs index cbb409f2aa..db3268a5f1 100644 --- a/WEB/Src/WindowsServer/WindowsServer/Implementation/MetricManager.cs +++ b/WEB/Src/WindowsServer/WindowsServer/Implementation/MetricManager.cs @@ -374,7 +374,7 @@ private void Snapshot() aggregationIntervalDuation = aggregationPeriod; } - if (aggregatorSnapshot.Count > 0) + if (!aggregatorSnapshot.IsEmpty) { foreach (KeyValuePair aggregatorWithStats in aggregatorSnapshot) { From 3933341dc9759a388a0601b47b6108f8570d15b1 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 24 Sep 2020 21:29:16 -0300 Subject: [PATCH 08/19] Updating DiagnosticSource to 5.0.0-RC version (#2067) * Updating System.Diagnostics.DiagnosticSource and System.Runtime.CompilerServices.Unsafe to rc version * removing reference from nuget.tests * Changing from AddTag to SetTag * suppressing CA2000 for activity * moving to old using style * removing DiagnosticSource and Unsafe from test projects * removing system.memory dependency * removing system.memory comment * Revert "Changing from AddTag to SetTag" This reverts commit c3ac937ae6a0e558e3bcaaff8057c3c3a12b4359. * renaming test to firstadded, since GetOperationName do FirstOrDefault * fixing tests removing unused ex variable adding comments to CA2000 that we disabled * updating comments and cijo's comments --- .../ActivityExtensionsTests.cs | 4 ++-- .../Channel/InMemoryTransmitterTests.cs | 22 ++++++++++--------- ...Microsoft.ApplicationInsights.Tests.csproj | 1 - ....ApplicationInsights.Isolated.Tests.csproj | 1 - .../TelemetryChannel.Nuget.Tests.csproj | 1 - .../TelemetryChannel.Tests.csproj | 3 --- .../ActivityExtensions.cs | 2 +- .../Microsoft.ApplicationInsights.csproj | 4 +--- .../DiagnosticSourceListener.csproj | 3 +-- .../HostingDiagnosticListener.cs | 6 +++++ ...soft.ApplicationInsights.AspNetCore.csproj | 4 +--- .../DependencyCollector.csproj | 4 +--- .../DependencyTrackingTelemetryModule.cs | 7 +++--- .../ClientServerDependencyTracker.cs | 3 +++ .../ServiceBusDiagnosticsEventHandler.cs | 3 +++ .../HostingStartup.Tests.csproj | 2 -- .../HostingStartup/HostingStartup.csproj | 4 +--- .../Perf.Tests/Perf.Tests.csproj | 3 --- .../PerformanceCollector/Perf.csproj | 4 +--- WEB/Src/Web/Web.Tests/Web.Tests.csproj | 1 - .../RequestTrackingExtensions.cs | 9 ++++++++ WEB/Src/Web/Web/Web.csproj | 3 +-- .../WindowsServer.Tests.csproj | 3 --- .../WindowsServer/WindowsServer.csproj | 3 +-- .../E2ETestAppCore20/E2ETestAppCore20.csproj | 2 +- 25 files changed, 49 insertions(+), 53 deletions(-) diff --git a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/ActivityExtensionsTests.cs b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/ActivityExtensionsTests.cs index f8b9f9625f..2534920847 100644 --- a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/ActivityExtensionsTests.cs +++ b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/ActivityExtensionsTests.cs @@ -29,13 +29,13 @@ public void SetOperationNameIsConsistentWithGetOperationName() } [TestMethod] - public void GetOperationNameReturnsLastAddedOperationName() + public void GetOperationNameReturnsFirstAddedOperationName() { var activity = new Activity("test"); activity.AddTag("OperationName", "test me 1"); activity.AddTag("OperationName", "test me 2"); - Assert.AreEqual("test me 2", activity.GetOperationName()); + Assert.AreEqual("test me 1", activity.GetOperationName()); } } } \ No newline at end of file diff --git a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Channel/InMemoryTransmitterTests.cs b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Channel/InMemoryTransmitterTests.cs index b36a310bc1..61a5fbfc99 100644 --- a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Channel/InMemoryTransmitterTests.cs +++ b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Channel/InMemoryTransmitterTests.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; - + using Extensibility; using System.Net.Http; using System.Threading; @@ -52,20 +52,22 @@ public override IEnumerable Dequeue() public void SendingLogicMarkedAsInternalSdkOperation() { var buffer = new TelemetryBufferWithInternalOperationValidation(); - var transmitter = new InMemoryTransmitter(buffer); - buffer.OnFull(); - - for (int i = 0; i < 10; i++) + using (var transmitter = new InMemoryTransmitter(buffer)) { - if (buffer.WasCalled) + buffer.OnFull(); + + for (int i = 0; i < 10; i++) { - break; + if (buffer.WasCalled) + { + break; + } + + Thread.Sleep(TimeSpan.FromSeconds(1)); } - Thread.Sleep(TimeSpan.FromSeconds(1)); + Assert.IsTrue(buffer.WasCalled); } - - Assert.IsTrue(buffer.WasCalled); } [TestMethod] diff --git a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Microsoft.ApplicationInsights.Tests.csproj b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Microsoft.ApplicationInsights.Tests.csproj index f18a421a1b..cb60a196d4 100644 --- a/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Microsoft.ApplicationInsights.Tests.csproj +++ b/BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/Microsoft.ApplicationInsights.Tests.csproj @@ -24,7 +24,6 @@ - diff --git a/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj b/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj index 46b1b8d4da..c03ba66165 100644 --- a/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj +++ b/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj @@ -27,7 +27,6 @@ - diff --git a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Nuget.Tests/TelemetryChannel.Nuget.Tests.csproj b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Nuget.Tests/TelemetryChannel.Nuget.Tests.csproj index 56f9ba2a61..f432faf45c 100644 --- a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Nuget.Tests/TelemetryChannel.Nuget.Tests.csproj +++ b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Nuget.Tests/TelemetryChannel.Nuget.Tests.csproj @@ -23,7 +23,6 @@ - diff --git a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj index 9b02518c45..459105771b 100644 --- a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj +++ b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj @@ -21,9 +21,6 @@ - - - diff --git a/BASE/src/Microsoft.ApplicationInsights/ActivityExtensions.cs b/BASE/src/Microsoft.ApplicationInsights/ActivityExtensions.cs index b454a04f52..b6a43d1ae5 100644 --- a/BASE/src/Microsoft.ApplicationInsights/ActivityExtensions.cs +++ b/BASE/src/Microsoft.ApplicationInsights/ActivityExtensions.cs @@ -52,7 +52,7 @@ private static bool Initialize() { try { - Assembly.Load(new AssemblyName("System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")); + Assembly.Load(new AssemblyName("System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")); return true; } catch (System.IO.FileNotFoundException) diff --git a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj index f1571e05b0..722e546fb1 100644 --- a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj +++ b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj @@ -23,9 +23,7 @@ All - - - + diff --git a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj index 22309b31ff..8403cf5c7d 100644 --- a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj +++ b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj @@ -22,8 +22,7 @@ - - + diff --git a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/DiagnosticListeners/Implementation/HostingDiagnosticListener.cs b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/DiagnosticListeners/Implementation/HostingDiagnosticListener.cs index 16377beefd..c6d4e0a71d 100644 --- a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/DiagnosticListeners/Implementation/HostingDiagnosticListener.cs +++ b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/DiagnosticListeners/Implementation/HostingDiagnosticListener.cs @@ -229,7 +229,10 @@ public void OnHttpRequestInStart(HttpContext httpContext) { // Scenario #3. W3C-TraceParent // We need to ignore the Activity created by Hosting, as it did not take W3CTraceParent into consideration. +#pragma warning disable CA2000 // Dispose objects before losing scope + // Even though we lose activity scope here, its retrieved using Activity.Current in end call back, and disposed/ended there newActivity = new Activity(ActivityCreatedByHostingDiagnosticListener); +#pragma warning restore CA2000 // Dispose objects before losing scope CopyActivityPropertiesFromAspNetCore(currentActivity, newActivity); newActivity.SetParentId(originalParentId); @@ -256,7 +259,10 @@ public void OnHttpRequestInStart(HttpContext httpContext) { if (TryGetW3CCompatibleTraceId(originalParentId, out var traceId)) { +#pragma warning disable CA2000 // Dispose objects before losing scope + // Even though we lose activity scope here, its retrieved using Activity.Current in end call back, and disposed/ended there newActivity = new Activity(ActivityCreatedByHostingDiagnosticListener); +#pragma warning restore CA2000 // Dispose objects before losing scope CopyActivityPropertiesFromAspNetCore(currentActivity, newActivity); newActivity.SetParentId(ActivityTraceId.CreateFromString(traceId), default(ActivitySpanId), ActivityTraceFlags.None); AspNetCoreEventSource.Instance.HostingListenerInformational(this.aspNetCoreMajorVersion, "Ignoring original Activity from Hosting to create new one using w3c compatible request-id."); diff --git a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj index 5b1199e904..5ab227aed7 100644 --- a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj +++ b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj @@ -30,9 +30,7 @@ - - - + diff --git a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj index d8a3d360b9..646ae9accf 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj +++ b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj @@ -26,9 +26,7 @@ - - - + diff --git a/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs b/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs index f502d486e7..8fcea7abaa 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs +++ b/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs @@ -282,9 +282,10 @@ protected virtual void Dispose(bool disposing) [MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)] private static void PrepareFirstActivity() { - var activity = new Activity("Microsoft.ApplicationInights.Init"); - activity.Start(); - activity.Stop(); + using (var activity = new Activity("Microsoft.ApplicationInights.Init")) + { + activity.Start(); + } } #if !NETSTANDARD diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs index 029750568c..f0e50e7b9e 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs +++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs @@ -42,7 +42,10 @@ internal static DependencyTelemetry BeginTracking(TelemetryClient telemetryClien // if dependency is tracked with profiler of event source, we need to generate a proper Id for it // in case of HTTP it will be propagated into the request header. // So, we will create a new Activity for the dependency, just to generate an Id. +#pragma warning disable CA2000 // Dispose objects before losing scope + // Even though we lose activity scope here, its retrieved using Activity.Current in end call back (HttpProcessing), and disposed/ended there activity = new Activity(DependencyActivityName); +#pragma warning restore CA2000 // Dispose objects before losing scope activity.Start(); } diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/EventHandlers/ServiceBusDiagnosticsEventHandler.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/EventHandlers/ServiceBusDiagnosticsEventHandler.cs index d704a78064..d9ca9291c5 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/EventHandlers/ServiceBusDiagnosticsEventHandler.cs +++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/EventHandlers/ServiceBusDiagnosticsEventHandler.cs @@ -40,7 +40,10 @@ public override void OnEvent(KeyValuePair evnt, DiagnosticListen // if hierarchical parent has compatible rootId, reuse it and keep legacy parentId if (W3CUtilities.TryGetTraceId(currentActivity.ParentId, out var traceId)) { +#pragma warning disable CA2000 // Dispose objects before losing scope + // Since we don't know when it will finish, we will not dispose var backCompatActivity = new Activity(currentActivity.OperationName); +#pragma warning restore CA2000 // Dispose objects before losing scope backCompatActivity.SetParentId(ActivityTraceId.CreateFromString(traceId), default, currentActivity.ActivityTraceFlags); backCompatActivity.Start(); backCompatActivity.AddTag("__legacyParentId", currentActivity.ParentId); diff --git a/WEB/Src/HostingStartup/HostingStartup.Tests/HostingStartup.Tests.csproj b/WEB/Src/HostingStartup/HostingStartup.Tests/HostingStartup.Tests.csproj index 69c104bcd9..a5ca941292 100644 --- a/WEB/Src/HostingStartup/HostingStartup.Tests/HostingStartup.Tests.csproj +++ b/WEB/Src/HostingStartup/HostingStartup.Tests/HostingStartup.Tests.csproj @@ -19,8 +19,6 @@ - - diff --git a/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj b/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj index 4402eaab3e..e30605638b 100644 --- a/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj +++ b/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj @@ -21,9 +21,7 @@ - - - + diff --git a/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj b/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj index e797763373..4101b9b0a4 100644 --- a/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj +++ b/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj @@ -32,9 +32,6 @@ - - - diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj index d35ef7dd72..31b080e6ab 100644 --- a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj +++ b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj @@ -22,9 +22,7 @@ - - - + diff --git a/WEB/Src/Web/Web.Tests/Web.Tests.csproj b/WEB/Src/Web/Web.Tests/Web.Tests.csproj index cda446083c..c45dfe2d52 100644 --- a/WEB/Src/Web/Web.Tests/Web.Tests.csproj +++ b/WEB/Src/Web/Web.Tests/Web.Tests.csproj @@ -37,7 +37,6 @@ - diff --git a/WEB/Src/Web/Web/Implementation/RequestTrackingExtensions.cs b/WEB/Src/Web/Web/Implementation/RequestTrackingExtensions.cs index a3386a7d3d..3e7d3acfce 100644 --- a/WEB/Src/Web/Web/Implementation/RequestTrackingExtensions.cs +++ b/WEB/Src/Web/Web/Implementation/RequestTrackingExtensions.cs @@ -38,7 +38,10 @@ internal static RequestTelemetry CreateRequestTelemetryPrivate( // will not be correlated properly to telemetry reported within the request // Here we simply maintaining backward compatibility with this behavior... +#pragma warning disable CA2000 // Dispose objects before losing scope + // Since we don't know when it will finish, we will not dispose currentActivity = new Activity(ActivityHelpers.RequestActivityItemName); +#pragma warning restore CA2000 // Dispose objects before losing scope if (!currentActivity.Extract(headers)) { if (ActivityHelpers.ParentOperationIdHeaderName != null && @@ -65,7 +68,10 @@ internal static RequestTelemetry CreateRequestTelemetryPrivate( if (W3CUtilities.TryGetTraceId(currentActivity.ParentId, out var traceId)) { legacyParentId = currentActivity.ParentId; +#pragma warning disable CA2000 // Dispose objects before losing scope + // Since we don't know when it will finish, we will not dispose currentActivity = CreateSubstituteActivityFromCompatibleRootId(currentActivity, traceId); +#pragma warning restore CA2000 // Dispose objects before losing scope } else { @@ -193,7 +199,10 @@ internal static string CreateRequestNamePrivate(this HttpContext platformContext private static Activity CreateSubstituteActivityFromCompatibleRootId(Activity currentActivity, ReadOnlySpan traceId) { +#pragma warning disable CA2000 // Dispose objects before losing scope + // Since we don't know when it will finish, we will not dispose var activity = new Activity(currentActivity.OperationName); +#pragma warning restore CA2000 // Dispose objects before losing scope activity.SetParentId(ActivityTraceId.CreateFromString(traceId), default, ActivityTraceFlags.None); foreach (var baggage in currentActivity.Baggage) diff --git a/WEB/Src/Web/Web/Web.csproj b/WEB/Src/Web/Web/Web.csproj index 77ac52bd56..90e7dfe8a0 100644 --- a/WEB/Src/Web/Web/Web.csproj +++ b/WEB/Src/Web/Web/Web.csproj @@ -21,8 +21,7 @@ - - + diff --git a/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj b/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj index f8185d287d..19886e6d76 100644 --- a/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj +++ b/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj @@ -37,9 +37,6 @@ - - - diff --git a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj index 72dcb80271..d7054b6a83 100644 --- a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj +++ b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj @@ -24,8 +24,7 @@ - - + diff --git a/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj b/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj index 58b51dde47..93e49372bc 100644 --- a/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj +++ b/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj @@ -31,7 +31,7 @@ - + From e202aff790cebfc069d228a7b03ec15232227718 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Fri, 25 Sep 2020 10:46:57 -0700 Subject: [PATCH 09/19] Create versions_and_names.md (#2072) Migrating this doc from Home repo. https://github.com/microsoft/ApplicationInsights-Home/blob/master/EndpointSpecs/SDK-VERSIONS.md --- docs/versions_and_names.md | 131 +++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 docs/versions_and_names.md diff --git a/docs/versions_and_names.md b/docs/versions_and_names.md new file mode 100644 index 0000000000..155cd15a61 --- /dev/null +++ b/docs/versions_and_names.md @@ -0,0 +1,131 @@ +# SDK Version + +SDK version is a field you can specify on every telemetry item. This field represent the specific SDK collected this particular item. This field is used for troubleshooting. + +To review version numbers click [here](https://github.com/Microsoft/ApplicationInsights-Home/wiki/SDK-Release-Schedule). + +## SDK Version Specification + +SDKs are required to include their name and version in the telemetry item using the `ai.internal.sdkVersion` tag conforming to the format below. + +``` +{ + "tags": { + "ai.internal.sdkVersion:" "dotnet:2.0.0" + } +} +``` + +### SDK Version Format + +``` + [PREFIX_]SDKNAME:SEMVER +``` + + + +| Section | Required | Description | Example | +|------------------|----------|-------------------------------------------------------------------------|---------| +| Prefix | No | An optional single lowercase letter (a-z) followed by an underscore (_) | a_ | +| SDK Name | Yes | An alpha lowercase string (a-z) | dotnet | +| Semantic Version | Yes | A [Semantic Versioning](http://semver.org/) compatible version string | 2.0.0 | + +SDK name and semver are delimited by a single colon (:). + +### Examples + +``` + r_dotnet:2.0.0-12345 + dotnet:2.0.0-beta.1 + | ------ ------------ + | | | + | | +-------> Semantic Version Format + | | + | +----------------> SDK Name + | + +---------------------> Prefix (optional) +``` + +## SDK Names + +Define your own SDK name and send PR to update the list below. Please do not re-use the same SDK name. + +| Name | Description | Links | +| --- | --- | --- | +| ai-k8s | Kubrnetes module | [github](https://github.com/Microsoft/ApplicationInsights-Kubernetes/blob/578f20e824e6248029554a1f8990b29c4a7c6d11/src/ApplicationInsights.Kubernetes/Utilities/SDKVersionUtils.cs#L34) +| angular | Unofficial Angular telemetry collection module for Application Insights | [github](https://github.com/VladimirRybalko/angular-applicationinsights/blob/244a003a6df2df487d903c99f75fd497d698dede/src/ApplicationInsights.ts#L47) [npmjs](https://www.npmjs.com/package/angular-applicationinsights) +| ap | Application Insights Profiler: Getting call traces, diagnose application performance | [github](https://github.com/Microsoft/ApplicationInsights-Profiler-AspNetCore) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Profiler.AspNetCore) +| apim | Telemetry sent from Azure API Management | | +| aspnet5f | ASP.NET Core SDK targetting .NET Framework | [github](https://github.com/Microsoft/ApplicationInsights-aspnetcore/releases) +| aspnet5c | ASP.NET Core SDK targetting .NET Core | [github](https://github.com/Microsoft/ApplicationInsights-aspnetcore/releases) +| azurefunctions | Telemetry produced by Azure Functions Host instrumentation | [github](https://github.com/Azure/azure-functions-host/blob/1f243e9febc4d431af3f0341bc8af74975d51659/src/WebJobs.Script/Host/ScriptTelemetryClientFactory.cs#L28) +| azurefunctionscoretools | Azure Functions Core Tools for local development experience | [github](https://github.com/Azure/azure-functions-core-tools/blob/acb5fd3b8d8fd77420ec500861c995ade2cead69/src/Azure.Functions.Cli/Diagnostics/ConsoleTelemetryClientFactory.cs#L22) +| azwapc | Performance counters collected via Azure App Services extensibility | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/eb884b81c568b1054f9b7168ea4b0ec61f9e3506/Src/PerformanceCollector/Perf.Shared/Implementation/PerformanceCounterUtility.cs#L27) +| azwapccore | .Net Core apps running in azure webapp | | +| dotnet | Base .NET SDK API was used to Track telemetry item, either manually, or from SDK that does not supply its own version. | [github](https://github.com/Microsoft/ApplicationInsights-dotnet/releases) +| dotnetc | Base .NET Core SDK API was used to Track telemetry item, either manually, or from SDK that does not supply its own version. | [github](https://github.com/Microsoft/ApplicationInsights-dotnet/releases) +| dsl | DiagnosticSource listener (Microsoft.ApplicationInsights.DiagnosticSourceListener) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.DiagnosticSourceListener) +| etw | ETW listener (Microsoft.ApplicationInsights.EtwCollector) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EtwCollector) +| evl | EventSource listener (Microsoft.ApplicationInsights.EventSourceListener) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EventSourceSourceListener) +| evtc | EventCounter collector | [github](https://github.com/microsoft/ApplicationInsights-dotnet/tree/develop/WEB/Src/EventCounterCollector) +| exstat | Experimental exceptions statistics feature | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/eb884b81c568b1054f9b7168ea4b0ec61f9e3506/Src/WindowsServer/WindowsServer.Net45/FirstChanceExceptionStatisticsTelemetryModule.cs#L102) +| go-oc | Opencensus for Go | [github](https://github.com/census-instrumentation/opencensus-go) +| hbnet | Heartbeat telemetry sent in intervals reported this metric item for the dotnet SDK | [github](https://github.com/Microsoft/ApplicationInsights-dotnet/releases) +| ios / osx | | +| ilf | Old ILogger adapter for ILogger (.NET Framework) | [github](https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Logging) +| ilc | Old ILogger adapter for ILogger (.NET Core) | [github](https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Logging) +| il | ILogger adapter for ILogger (.NET Core) | [github](https://github.com/microsoft/ApplicationInsights-dotnet-logging/tree/develop/src/ILogger) +| java | java SDK | [github](https://github.com/Microsoft/ApplicationInsights-java/releases) +| javascript | JavaScript SDK | [github](https://github.com/Microsoft/ApplicationInsights-js/releases) +| log4net | .NET logging adapter for log4net (Microsoft.ApplicationInsights.Log4NetAppender) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Log4NetAppender) +| logary | Telemetry produced by F# logging library Logary | [github](https://github.com/logary/logary/blob/f86bdf05c66ab0387598f0bb3040c0dafe1f92b8/src/targets/Logary.Targets.ApplicationInsights/Targets_AppInsights.fs#L72-L74) +| m-agg / m-agg2 | metric aggregation pipeline reported this metric | [github](https://github.com/Microsoft/ApplicationInsights-dotnet/releases) +| m-agg2c | metric aggregation pipeline (.net core) reported this metric | [github](https://github.com/Microsoft/ApplicationInsights-dotnet/releases) +| nlog | .NET logging adapter for nlog (Microsoft.ApplicationInsights.NLogTarget) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget) +| node| node.js SDK | [github](https://github.com/Microsoft/ApplicationInsights-node.js/releases) +| one-line-ps | | [apmtips](http://apmtips.com/blog/2017/03/27/oneliner-to-send-event-to-application-insights/) +| owin | May point to unofficial OWIN telemetry module | [github](https://github.com/MatthewRudolph/Airy-ApplicationInsights-Owin/blob/a555ddc810edb5b9e8d4866c41ba18ddf793bc1d/src/Dematt.Airy.ApplicationInsights.Owin/ExceptionTracking/MvcExceptionHandler.cs#L38) +| pc | performance counters | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| pccore | performance counters from .Net Core | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| py2 | python SDK for py2 application | [github](https://github.com/Microsoft/ApplicationInsights-Python/blob/7ac535f451383d78d63bfc2b8aad518cdde598c7/applicationinsights/channel/TelemetryChannel.py#L9-L15) +| py3 | python SDK for py3 application | [github](https://github.com/Microsoft/ApplicationInsights-Python/blob/7ac535f451383d78d63bfc2b8aad518cdde598c7/applicationinsights/channel/TelemetryChannel.py#L9-L15) +| python-oc | Opencensus for Python | [github](https://github.com/census-instrumentation/opencensus-python) +| rddf | Remote dependency telemetry collected via Framework instrumentation (Event Source) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| rddfd | Telemetry was processed via framework and diagnosticsource paths. Deprecated in latest versions of SDK | +| rddp | Remote dependency telemetry collected via Profiler instrumentation | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| rddsr | Azure Service Fabric service remoting call - Client side | [github](https://github.com/Microsoft/ApplicationInsights-ServiceFabric/blob/275166d8034f1b94881982073e304166fbaef6bd/src/ApplicationInsights.ServiceFabric.Native.Shared/DependencyTrackingModule/ServiceRemotingClientEventListener.cs#L41) +| rdddsc | Remote dependency telemetry collected via Diagnostic Source for .NET Core | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| rdddsd | Remote dependency telemetry collected via Diagnostic Source for Desktop framework | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| rb | Ruby SDK | [github](https://github.com/Microsoft/ApplicationInsights-Ruby/blob/c78bb54c8b5c0f70218482219fb8447416cfe550/lib/application_insights/channel/telemetry_channel.rb#L89) +| sc | Snapshot Debugger (Microsoft.ApplicationInsights.SnapshotCollector) | [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.SnapshotCollector) +| sd | System diagnostics trace (Microsoft.ApplicationInsights.TraceListener) | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-logging) [nuget](https://www.nuget.org/packages/Microsoft.ApplicationInsights.TraceListener) +| serviceremoting | Azure Service Fabric service remoting call - Server side | [github](https://github.com/Microsoft/ApplicationInsights-ServiceFabric/blob/275166d8034f1b94881982073e304166fbaef6bd/src/ApplicationInsights.ServiceFabric.Native.Shared/RequestTrackingModule/ServiceRemotingServerEventListener.cs#L29) +| unobs | unobserved exceptions - part of web SDK | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| unhnd | unhandled exceptions – part of web SDK | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| wad | Windows Azure Diagnostics reporting through AI | | +| wad2ai | Application Insight's Azure Diagnostics sink | [MicrosoftDocs](https://docs.microsoft.com/azure/monitoring-and-diagnostics/azure-diagnostics-configure-application-insights) +| wcf | WCF Application Insights lab project | [github](https://github.com/Microsoft/ApplicationInsights-SDK-Labs/tree/master/WCF) [myget](https://www.myget.org/feed/applicationinsights-sdk-labs/package/nuget/Microsoft.ApplicationInsights.Wcf) [blog](https://azure.microsoft.com/en-us/blog/wcf-monitoring-with-application-insights/) +| web | telemetry that was collected by AI Web SDK, mostly is found on requests | [github](https://github.com/Microsoft/ApplicationInsights-dotnet-server/releases) +| webjobs | Azure Web Jobs hosting | [github](https://github.com/Azure/azure-webjobs-sdk/blob/5d3952d010c0981477e8b09f60b62312f85d4e1f/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/DefaultTelemetryClientFactory.cs#L54) + + +## Prefixes +Define the prefixes for the SDK. + +| SDK Name | Prefix | Description | +|-----------|:------:|-------------------------------------| +| Redfield1 | ad_ | Telemetry from Redfield AppServices attach, using the **default** configuration | +| Redfield1 | ar_ | Telemetry from Redfield AppServices attach, using the **recommended** configuration | +| Redfield1 | csd_ | Telemetry from Redfield CloudServices attach, using the **default** configuration | +| Redfield1 | csr_ | Telemetry from Redfield CloudServices attach, using the **recommended** configuration | +| Redfield1 | ud_ | Telemetry from Redfield unknown environment attach, using the **default** configuration | +| Redfield1 | ur_ | Telemetry from Redfield unknown environment attach, using the **recommended** configuration | +| ap | w_ | Telemetry from **Windows** Platform | +| ap | l_ | Telemetry from **Linux** Platform | +| python-oc | lf_ | Telemetry captured by LocalForwarder | +| go-oc | lf_ | Telemetry captured by LocalForwarder | +| java | lf_ | Telemetry captured by LocalForwarder | + + +## Footnotes +1. Redfield attach applications are: Azure AppService Extension, Azure CloudService Extension, Azure VM Extension, and StatusMonitor. From a9d1ceb0e0286c207704ae4249fc832f79b117f0 Mon Sep 17 00:00:00 2001 From: Reiley Yang Date: Fri, 25 Sep 2020 11:41:33 -0700 Subject: [PATCH 10/19] Avoid emitting {OriginalFormat} as a property name (#2071) * avoid emitting {OriginalFormat} as a property name * update changelog Co-authored-by: Cijo Thomas --- CHANGELOG.md | 1 + LOGGING/src/ILogger/ApplicationInsightsLogger.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a80ced0e81..cd75134dde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## VNext - [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065) +- [The `{OriginalFormat}` field in ILogger will be emitted as `OriginalFormat` with the braces removed](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2071) ## Version 2.15.0 - EventCounterCollector module does not add AggregationInterval as a dimension to the metric. diff --git a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs index ce0a79793f..2767dc7b5c 100644 --- a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs +++ b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs @@ -174,7 +174,14 @@ private void PopulateTelemetry(ISupportProperties telemetryItem, TState { foreach (KeyValuePair item in stateDictionary) { - dict[item.Key] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); + if (item.Key == "{OriginalFormat}") + { + dict["OriginalFormat"] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); + } + else + { + dict[item.Key] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); + } } } From 507a2d7035423d2c3601bcd3eecb5c5dd0b2826f Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Fri, 25 Sep 2020 15:23:47 -0700 Subject: [PATCH 11/19] migrating build scripts from Home repo (#2073) --- .scripts/release_GenerateReleaseMetadata.ps1 | 2 +- .scripts/release_MetaDataToCTI.ps1 | 70 +++++++++++++ .scripts/release_MetaDataToReleaseNotes.ps1 | 102 +++++++++++++++++++ 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 .scripts/release_MetaDataToCTI.ps1 create mode 100644 .scripts/release_MetaDataToReleaseNotes.ps1 diff --git a/.scripts/release_GenerateReleaseMetadata.ps1 b/.scripts/release_GenerateReleaseMetadata.ps1 index e157741e3d..770e209328 100644 --- a/.scripts/release_GenerateReleaseMetadata.ps1 +++ b/.scripts/release_GenerateReleaseMetadata.ps1 @@ -11,7 +11,7 @@ Param( ) # SUMMARY -# This script will inventory the nuget packages output by a build and create a metadata file. +# This script will inventory the nuget packages output by a build and create a metadata file (releaseMetaData.xml). # This metadata file must be published with the NUPKGs when archived. # This metadata file is used by the release infrastructure and informs it on how to publish NUPKGs. # This script is included in Gated builds for troubleshooting. diff --git a/.scripts/release_MetaDataToCTI.ps1 b/.scripts/release_MetaDataToCTI.ps1 new file mode 100644 index 0000000000..c60215e3bb --- /dev/null +++ b/.scripts/release_MetaDataToCTI.ps1 @@ -0,0 +1,70 @@ +Param( + [Parameter(Mandatory=$true,HelpMessage="Path to releaseMetaData.xml")] + [string] + $metadataPath +) + +# SUMMARY +# This script will parse a metadata file (releaseMetaData.xml) and generate and generate an email to send to our testing team. +# The metadata can be used to construct paths to the newly uploaded nuget packages in myget. + +# DEVELOPER notes +# In the release definition, set metadataPath = "$(SYSTEM.ARTIFACTSDIRECTORY)"; +# This is a Work In Progress: I haven't been able to find a build task that can send emails. +# Instead, have to settle for generating the email template. + + +function Send-CtiEmail([string]$emailBody) { + #TODO +} + + +if($metadataPath -notlike "releaseMetaData.xml") { + Write-Verbose "'releaseMetaData.xml' not part of MetaDataPath: $metadataPath" + Write-Verbose "Searching..." + #assume this is Artifact Directory and find the required file + $items = Get-ChildItem -Path $metadataPath -Recurse -Filter "releaseMetaData.xml" + $items | ForEach-Object { Write-Verbose "Found: $($_.FullName)" } + $metadataPath = $items[0].FullName +} +Write-Verbose "MetaDataPath: $metadataPath" +[xml]$metaData = Get-Content $metadataPath + +# build email +# $sb = [System.Text.StringBuilder]::new(); +# [void]$sb.AppendFormat("CTI Test of {0} {1}", "Application Insights SDKs", $metaData.MetaData.ReleaseName); +# [void]$sb.AppendLine("
"); +# [void]$sb.AppendLine("
Requesting a CTI Test of the following SDKs:"); +# [void]$sb.AppendLine("
"); +# [void]$sb.AppendLine("
    "); +# foreach( $package in $metaData.MetaData.Packages.Package) { +# [void]$sb.AppendLine([string]::Format("
  • {0} {1}
  • ", $package.Name, $package.MyGetUri)); +# } +# [void]$sb.AppendLine("

"); +# [void]$sb.AppendLine("
"); +# [void]$sb.AppendFormat("
If there are any issues, please reach out to {0}", "_NAME_"); +# $emailBody = $sb.ToString() + +# Write-Output $emailBody + +# Send-CtiEmail $emailBody + + + + +# build email text +$sb = [System.Text.StringBuilder]::new(); +[void]$sb.AppendFormat("CTI Test of {0} {1}", "Application Insights SDKs", $metaData.MetaData.ReleaseName); +[void]$sb.AppendLine(""); +[void]$sb.AppendLine("Requesting a CTI Test of the following SDKs:"); +[void]$sb.AppendLine(""); +[void]$sb.AppendLine(""); +foreach( $package in $metaData.MetaData.Packages.Package) { + [void]$sb.AppendLine([string]::Format("{0} {1}", $package.Name, $package.MyGetUri)); +} +[void]$sb.AppendLine(""); +[void]$sb.AppendLine(""); +[void]$sb.AppendFormat("If there are any issues, please reach out to {0}", "_NAME_"); +$emailBody = $sb.ToString() + +Write-Output $emailBody \ No newline at end of file diff --git a/.scripts/release_MetaDataToReleaseNotes.ps1 b/.scripts/release_MetaDataToReleaseNotes.ps1 new file mode 100644 index 0000000000..3d0bb9a770 --- /dev/null +++ b/.scripts/release_MetaDataToReleaseNotes.ps1 @@ -0,0 +1,102 @@ +Param( + [Parameter(Mandatory=$true,HelpMessage="Path to releaseMetaData.xml")] + [string] + $metadataPath, + + [Parameter(Mandatory=$true,HelpMessage="Github Repo Name")] + [string] + $gitHubRepository, + + [Parameter(Mandatory=$true,HelpMessage="Github Username with Write permissions")] + [string] + $gitHubUsername, + + [Parameter(Mandatory=$true,HelpMessage="Github User's personal api token (https://github.com/blog/1509-personal-api-tokens)")] + [string] + $gitHubApiKey +) + +# SUMMARY +# This script will parse a metadata file (releaseMetaData.xml) and generate the release notes. +# The metadata contains a copy of the relevant changelog as well as the commit id. +# The commit id is required to create a release tag in github. + +# DEVELOPER notes +# In the release definition, set metadataPath = "$(SYSTEM.ARTIFACTSDIRECTORY)"; + + +function Push-Github { + #https://developer.github.com/v3/repos/releases/#create-a-release + Param ( + [string]$tagName, + [string]$releaseName, + # The Commit SHA for corresponding to this release + [string]$commitId, + # The notes to accompany this release, uses the commit message in this case + [string]$releaseNotes, + # The github username + [string]$gitHubUsername, + # The github repository name + [string]$gitHubRepository, + # The github API key (https://github.com/blog/1509-personal-api-tokens) + [string]$gitHubApiKey, + # Set to true to mark this as a pre-release version + [bool]$preRelease = $TRUE, + # Set to true to mark this as a draft release (not visible to users) + [bool]$draft = $FALSE + ) + + $releaseData = @{ + tag_name = $tagName; + target_commitish = $commitId; + name = $releaseName; + body = $releaseNotes; + draft = $draft; + prerelease = $preRelease; + } + + $authPair = "$($gitHubUsername):$($gitHubApiKey)" + $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($authPair)); + $basicAuthValue = "Basic $encodedCreds" + + $releaseCmd = @{ + Uri = "https://api.github.com/repos/$gitHubRepository/releases"; + Method = 'POST'; + Headers = @{ + Authorization = $basicAuthValue + } + ContentType = 'application/json'; + Body = (ConvertTo-Json $releaseData -Compress) + } + + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + Invoke-RestMethod @releaseCmd +} + + + +if($metadataPath -notlike "releaseMetaData.xml") { + Write-Verbose "'releaseMetaData.xml' not part of MetaDataPath: $metadataPath" + Write-Verbose "Searching..." + #assume this is Artifact Directory and find the required file + $items = Get-ChildItem -Path $metadataPath -Recurse -Filter "releaseMetaData.xml" + $items | ForEach-Object { Write-Verbose "Found: $($_.FullName)" } + $metadataPath = $items[0].FullName +} +Write-Verbose "MetaDataPath: $metadataPath" + +if (Test-Path $metadataPath) { + + [xml]$metaData = Get-Content $metadataPath + + $commitId = $metaData.MetaData.CommitId; + $tagName = $metaData.MetaData.ReleaseName; + $releaseName = $metaData.MetaData.FormattedReleaseName; + $releaseNotes = $metaData.MetaData.ChangeLog; + $isPreRelease = [System.Convert]::ToBoolean($metaData.MetaData.isPreRelease); + + Push-Github -tagName $tagName -releaseName $releaseName -commitId $commitId -releaseNotes $releaseNotes -gitHubUsername $gitHubUsername -gitHubRepository $gitHubRepository -gitHubApiKey $gitHubApiKey -preRelease $isPreRelease; + +} else { + Write-Error "MetaData Not Found." +} \ No newline at end of file From 81288f26921df1e8e713d31e7e9c2187ac9e6590 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Sun, 4 Oct 2020 08:58:42 -0700 Subject: [PATCH 12/19] =?UTF-8?q?ILogger=20provider=20populates=20structur?= =?UTF-8?q?ed=20logging=20key/values=20irrespective=E2=80=A6=20(#2078)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ILogger provider populates structured logging key/values irrespective of whether Scopes are enabled or not * comment --- CHANGELOG.md | 1 + .../src/ILogger/ApplicationInsightsLogger.cs | 24 ++++----- .../ILogger.Tests/ILoggerIntegrationTests.cs | 52 ++++++++++++++++++- 3 files changed, 63 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd75134dde..bf13d60fde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## VNext - [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065) - [The `{OriginalFormat}` field in ILogger will be emitted as `OriginalFormat` with the braces removed](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2071) +- ApplicationInsightsLoggerProvider populates structured logging key/values irrespective of whether Scopes are enabled or not. ## Version 2.15.0 - EventCounterCollector module does not add AggregationInterval as a dimension to the metric. diff --git a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs index 2767dc7b5c..dfbb0d44b5 100644 --- a/LOGGING/src/ILogger/ApplicationInsightsLogger.cs +++ b/LOGGING/src/ILogger/ApplicationInsightsLogger.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. // All rights reserved. 2013 // // ----------------------------------------------------------------------- @@ -168,23 +168,23 @@ private void PopulateTelemetry(ISupportProperties telemetryItem, TState dict["EventName"] = eventId.Name; } - if (this.applicationInsightsLoggerOptions.IncludeScopes) + if (state is IReadOnlyCollection> stateDictionary) { - if (state is IReadOnlyCollection> stateDictionary) + foreach (KeyValuePair item in stateDictionary) { - foreach (KeyValuePair item in stateDictionary) + if (item.Key == "{OriginalFormat}") { - if (item.Key == "{OriginalFormat}") - { - dict["OriginalFormat"] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); - } - else - { - dict[item.Key] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); - } + dict["OriginalFormat"] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); + } + else + { + dict[item.Key] = Convert.ToString(item.Value, CultureInfo.InvariantCulture); } } + } + if (this.applicationInsightsLoggerOptions.IncludeScopes) + { if (this.ExternalScopeProvider != null) { StringBuilder stringBuilder = new StringBuilder(); diff --git a/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs b/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs index 1a5918964c..72e1168a4b 100644 --- a/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs +++ b/LOGGING/test/ILogger.Tests/ILoggerIntegrationTests.cs @@ -23,6 +23,54 @@ namespace Microsoft.ApplicationInsights [TestClass] public class ILoggerIntegrationTests { + /// + /// Ensures that populates params for structured logging into custom properties . + /// + [TestMethod] + [TestCategory("ILogger")] + public void ApplicationInsightsLoggerPopulateStructureLoggingParamsIntoCustomProperties() + { + List itemsReceived = new List(); + + // Scopes are enabled. + IServiceProvider serviceProvider = ILoggerIntegrationTests.SetupApplicationInsightsLoggerIntegration( + (telemetryItem, telemetryProcessor) => itemsReceived.Add(telemetryItem), + configureTelemetryConfiguration: null, + configureApplicationInsightsOptions: (appInsightsLoggerOptions) => appInsightsLoggerOptions.IncludeScopes = true); + + ILogger testLogger = serviceProvider.GetRequiredService>(); + testLogger.LogInformation("Testing structured with {CustomerName} {Age}", "TestCustomerName", 20); + + Assert.AreEqual("Testing structured with TestCustomerName 20", (itemsReceived[0] as TraceTelemetry).Message); + var customProperties = (itemsReceived[0] as TraceTelemetry).Properties; + Assert.IsTrue(customProperties["CustomerName"].Equals("TestCustomerName")); + Assert.IsTrue(customProperties["Age"].Equals("20")); + } + + /// + /// Ensures that populates params for structured logging into custom properties . + /// + [TestMethod] + [TestCategory("ILogger")] + public void ApplicationInsightsLoggerPopulateStructureLoggingParamsIntoCustomPropertiesWhenScopeDisabled() + { + List itemsReceived = new List(); + + // Disable scope + IServiceProvider serviceProvider = ILoggerIntegrationTests.SetupApplicationInsightsLoggerIntegration( + (telemetryItem, telemetryProcessor) => itemsReceived.Add(telemetryItem), + configureTelemetryConfiguration: null, + configureApplicationInsightsOptions: (appInsightsLoggerOptions) => appInsightsLoggerOptions.IncludeScopes = false); + + ILogger testLogger = serviceProvider.GetRequiredService>(); + testLogger.LogInformation("Testing structured with {CustomerName} {Age}", "TestCustomerName", 20); + + Assert.AreEqual("Testing structured with TestCustomerName 20", (itemsReceived[0] as TraceTelemetry).Message); + var customProperties = (itemsReceived[0] as TraceTelemetry).Properties; + Assert.IsTrue(customProperties["CustomerName"].Equals("TestCustomerName")); + Assert.IsTrue(customProperties["Age"].Equals("20")); + } + /// /// Ensures that is invoked when user logs using . /// @@ -142,7 +190,7 @@ public void ApplicationInsightsLoggerLogsExceptionAsTraceWhenSwitchIsFalse() Assert.AreEqual(SeverityLevel.Error, (itemsReceived[1] as TraceTelemetry).SeverityLevel); Assert.AreEqual("LoggerMessage", (itemsReceived[1] as TraceTelemetry).Message); - + Assert.IsTrue((itemsReceived[1] as TraceTelemetry).Properties["ExceptionMessage"].Contains("StackTraceEnabled")); Assert.IsTrue((itemsReceived[1] as TraceTelemetry).Properties.ContainsKey("ExceptionStackTrace")); @@ -263,7 +311,7 @@ public void DefaultLoggerOptionsAreCorrectlyRegistered() IServiceProvider serviceProvider = ILoggerIntegrationTests.SetupApplicationInsightsLoggerIntegration( (telemetryItem, telemetryProcessor) => { }); - IOptions registeredOptions = + IOptions registeredOptions = serviceProvider.GetRequiredService>(); Assert.IsTrue(registeredOptions.Value.TrackExceptionsAsExceptionTelemetry); From 4cfb9ad42bba7a99e75b46a0109b0a5b0e128d46 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Mon, 5 Oct 2020 15:50:23 -0700 Subject: [PATCH 13/19] fix nuget audit (#2081) --- .scripts/release_NupkgAudit.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/release_NupkgAudit.ps1 b/.scripts/release_NupkgAudit.ps1 index 722eae4c1b..7e87658a1e 100644 --- a/.scripts/release_NupkgAudit.ps1 +++ b/.scripts/release_NupkgAudit.ps1 @@ -326,7 +326,7 @@ function Start-EvaluateNupkg ($nupkgPath) { [xml]$nuspecXml = Get-Content $_.FullName Get-IsValidPackageId $nuspecXml; Get-IsValidAuthors $nuspecXml; - Get-IsValidOwners $nuspecXml; + #Get-IsValidOwners $nuspecXml; dotnet stopped building this property. Disabling the check. Get-IsValidProjectUrl $nuspecXml; Get-IsValidLicense $nuspecXml; Get-IsValidLicenseAcceptance $nuspecXml; From ad8fc688b64c246de5d1edb5303aa733e69c2e8c Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Tue, 6 Oct 2020 05:28:26 -0300 Subject: [PATCH 14/19] Cleaning non-used packages (#2069) Co-authored-by: Cijo Thomas --- .../PerformanceCollector/Perf.csproj | 9 --------- 1 file changed, 9 deletions(-) diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj index 31b080e6ab..f8520a8f06 100644 --- a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj +++ b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj @@ -22,22 +22,13 @@
- - - - - - - - - From cb5e9b1361d67eae69e9019aade4357a8f6c3d46 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Thu, 8 Oct 2020 16:18:15 -0700 Subject: [PATCH 15/19] add WorkerService examples from HOME (#2085) * add WorkerService examples from HOME * Update Program.cs * Update Program.cs * Update Program.cs * Update Program.cs * Update Program.cs * Update Program.cs * Update Program.cs --- .../BackgroundTasksWithHostedService.sln | 25 ++++++ .../BackgroundTasksWithHostedService.csproj | 21 +++++ .../HostedServices/TimeHostedService.cs | 61 +++++++++++++ .../MyCustomTelemetryInitializer.cs | 15 ++++ .../MyCustomTelemetryProcessor.cs | 22 +++++ .../Program.cs | 64 ++++++++++++++ .../Properties/launchSettings.json | 27 ++++++ .../appsettings.Development.json | 9 ++ .../appsettings.json | 18 ++++ .../ConsoleAppWithApplicationInsights.sln | 25 ++++++ .../ConsoleAppWithApplicationInsights.csproj | 12 +++ .../Program.cs | 85 +++++++++++++++++++ ...erServiceSampleWithApplicationInsights.sln | 25 ++++++ .../MyCustomTelemetryInitializer.cs | 18 ++++ .../MyCustomTelemetryProcessor.cs | 25 ++++++ .../Program.cs | 41 +++++++++ .../Properties/launchSettings.json | 10 +++ .../Worker.cs | 45 ++++++++++ ...erviceSampleWithApplicationInsights.csproj | 12 +++ .../appsettings.Development.json | 9 ++ .../appsettings.json | 17 ++++ 21 files changed, 586 insertions(+) create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.sln create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.csproj create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/HostedServices/TimeHostedService.cs create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryInitializer.cs create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryProcessor.cs create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Program.cs create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Properties/launchSettings.json create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.Development.json create mode 100644 examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.json create mode 100644 examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.sln create mode 100644 examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.csproj create mode 100644 examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/Program.cs create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.sln create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryInitializer.cs create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryProcessor.cs create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Program.cs create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Properties/launchSettings.json create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Worker.cs create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.csproj create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.Development.json create mode 100644 examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.json diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.sln b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.sln new file mode 100644 index 0000000000..bdc0c3a8ae --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29316.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackgroundTasksWithHostedService", "BackgroundTasksWithHostedService\BackgroundTasksWithHostedService.csproj", "{BC463E42-BAD3-41C4-AA3A-86C61FEAAFF8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BC463E42-BAD3-41C4-AA3A-86C61FEAAFF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC463E42-BAD3-41C4-AA3A-86C61FEAAFF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC463E42-BAD3-41C4-AA3A-86C61FEAAFF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC463E42-BAD3-41C4-AA3A-86C61FEAAFF8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CA92F614-C075-4162-9306-6458A4C83B4C} + EndGlobalSection +EndGlobal diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.csproj b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.csproj new file mode 100644 index 0000000000..55ee1c4daa --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService.csproj @@ -0,0 +1,21 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + + + + + + + + + diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/HostedServices/TimeHostedService.cs b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/HostedServices/TimeHostedService.cs new file mode 100644 index 0000000000..f4fbcd92b9 --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/HostedServices/TimeHostedService.cs @@ -0,0 +1,61 @@ +using Microsoft.ApplicationInsights; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace BackgroundTasksWithHostedService.HostedServices +{ + public class TimedHostedService : IHostedService, IDisposable + { + private readonly ILogger _logger; + private Timer _timer; + private TelemetryClient tc; + private static HttpClient httpClient = new HttpClient(); + + public TimedHostedService(ILogger logger, TelemetryClient tc) + { + _logger = logger; + this.tc = tc; + } + + public Task StartAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("Timed Background Service is starting."); + + _timer = new Timer(DoWork, null, TimeSpan.Zero, + TimeSpan.FromSeconds(5)); + + return Task.CompletedTask; + } + + private void DoWork(object state) + { + using (tc.StartOperation("workeroperation")) + { + _logger.LogInformation("Timed Background Service is working."); + var res = httpClient.GetAsync("https://bing.com").Result.StatusCode; + _logger.LogInformation("bing http call completed with status:" + res); + } + } + + public Task StopAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("Timed Background Service is stopping."); + + _timer?.Change(Timeout.Infinite, 0); + + return Task.CompletedTask; + } + + public void Dispose() + { + _timer?.Dispose(); + } + } +} diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryInitializer.cs b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryInitializer.cs new file mode 100644 index 0000000000..1b4fdaf4fe --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryInitializer.cs @@ -0,0 +1,15 @@ +using Microsoft.ApplicationInsights.Channel; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.ApplicationInsights.Extensibility; + +namespace BackgroundTasksWithHostedService +{ + public class MyCustomTelemetryInitializer : ITelemetryInitializer + { + public void Initialize(ITelemetry telemetry) + { + // Replace with actual properties. + (telemetry as ISupportProperties).Properties["MyCustomKey"] = "MyCustomValue"; + } + } +} diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryProcessor.cs b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryProcessor.cs new file mode 100644 index 0000000000..a4e1284815 --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/MyCustomTelemetryProcessor.cs @@ -0,0 +1,22 @@ +using Microsoft.ApplicationInsights.Channel; +using Microsoft.ApplicationInsights.Extensibility; + +namespace BackgroundTasksWithHostedService +{ + public class MyCustomTelemetryProcessor : ITelemetryProcessor + { + ITelemetryProcessor next; + + public MyCustomTelemetryProcessor(ITelemetryProcessor next) + { + this.next = next; + + } + public void Process(ITelemetry item) + { + // Example processor - not filtering out anything. + // This should be replaced with actual logic. + this.next.Process(item); + } + } +} diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Program.cs b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Program.cs new file mode 100644 index 0000000000..1b6bfb4a16 --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Program.cs @@ -0,0 +1,64 @@ +using System.Threading.Tasks; +using BackgroundTasksWithHostedService.HostedServices; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace BackgroundTasksWithHostedService +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = new HostBuilder() + .ConfigureLogging((hostContext, config) => + { + config.AddConsole(); + config.AddDebug(); + }) + .ConfigureHostConfiguration(config => + { + config.AddEnvironmentVariables(); + }) + .ConfigureAppConfiguration((hostContext, config) => + { + config.AddJsonFile("appsettings.json", optional: true); + config.AddJsonFile($"appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", optional: true); + config.AddCommandLine(args); + }) + .ConfigureServices((hostContext, services) => + { + services.AddLogging(); + services.AddHostedService(); + + // Application Insights + // Add custom TelemetryInitializer + services.AddSingleton(); + + // Add custom TelemetryProcessor + services.AddApplicationInsightsTelemetryProcessor(); + + // Example on Configuring TelemetryModules. + // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a real api key, this is example code.")] + services.ConfigureTelemetryModule((mod, opt) => mod.AuthenticationApiKey = "put_actual_authentication_key_here"); + + // instrumentation key is read automatically from appsettings.json + services.AddApplicationInsightsTelemetryWorkerService(); + }) + .UseConsoleLifetime() + .Build(); + + using (host) + { + // Start the host + await host.StartAsync(); + + // Wait for the host to shutdown + await host.WaitForShutdownAsync(); + } + } + } +} diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Properties/launchSettings.json b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Properties/launchSettings.json new file mode 100644 index 0000000000..8e39ab97b7 --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:33409", + "sslPort": 44309 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BackgroundTasksWithHostedService": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.Development.json b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.Development.json new file mode 100644 index 0000000000..e203e9407e --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.json b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.json new file mode 100644 index 0000000000..23bcfa327c --- /dev/null +++ b/examples/WorkerServiceSDK/BackgroundTasksWithHostedService/BackgroundTasksWithHostedService/appsettings.json @@ -0,0 +1,18 @@ +{ + "Logging": { + "ApplicationInsights": { + "LogLevel": { + "BackgroundTasksWithHostedService.HostedServices.TimedHostedService": "Information" + } + }, + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "ApplicationInsights": { + "InstrumentationKey": "putactualinstrumentationkey" + }, + "AllowedHosts": "*" +} diff --git a/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.sln b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.sln new file mode 100644 index 0000000000..779fd99e93 --- /dev/null +++ b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29316.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleAppWithApplicationInsights", "ConsoleAppWithApplicationInsights\ConsoleAppWithApplicationInsights.csproj", "{BA1E9828-9963-424D-BA57-A8D6059B755C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BA1E9828-9963-424D-BA57-A8D6059B755C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA1E9828-9963-424D-BA57-A8D6059B755C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA1E9828-9963-424D-BA57-A8D6059B755C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA1E9828-9963-424D-BA57-A8D6059B755C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A8809924-5872-42F8-832B-257937693681} + EndGlobalSection +EndGlobal diff --git a/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.csproj b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.csproj new file mode 100644 index 0000000000..39a6d74391 --- /dev/null +++ b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp2.2 + + + + + + + diff --git a/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/Program.cs b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/Program.cs new file mode 100644 index 0000000000..a888e6b35d --- /dev/null +++ b/examples/WorkerServiceSDK/ConsoleAppWithApplicationInsights/ConsoleAppWithApplicationInsights/Program.cs @@ -0,0 +1,85 @@ +using Microsoft.ApplicationInsights; +using Microsoft.ApplicationInsights.Channel; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse; +using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; +using System.Net.Http; +using System.Threading.Tasks; + +namespace ConsoleAppWithApplicationInsights +{ + class Program + { + static void Main(string[] args) + { + // Create the DI container. + IServiceCollection services = new ServiceCollection(); + + // Add or configure channel + services.AddSingleton(new ServerTelemetryChannel() { StorageFolder = @"C:\temp\aisdkstorage" }); + + // Add custom TelemetryInitializer + services.AddSingleton(); + + // Being a regular console app, there is no appsettings.json or configuration providers enabled by default. + // Hence instrumentation key must be specified here. + services.AddApplicationInsightsTelemetryWorkerService("put_actual_ikey_here"); + + // Add custom TelemetryProcessor + services.AddApplicationInsightsTelemetryProcessor(); + + // Example on Configuring TelemetryModules. + // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a real api key, this is example code.")] + services.ConfigureTelemetryModule((module, opt) => module.AuthenticationApiKey = "put_actual_authentication_key_here"); + + // Build ServiceProvider. + IServiceProvider serviceProvider = services.BuildServiceProvider(); + + // Obtain logger instance from DI. + ILogger logger = serviceProvider.GetRequiredService>(); + + // Obtain TelemetryClient instance from DI, for additional manual tracking or to flush. + var telemetryClient = serviceProvider.GetRequiredService(); + + var res = new HttpClient().GetAsync("https://bing.com").Result.StatusCode; // this dependency will be captured by Application Insights. + logger.LogWarning("Response from bing is:" + res); // this will be captured by Application Insights. + + telemetryClient.TrackEvent("sampleevent"); + + // Explicitly call Flush() followed by sleep is required in Console Apps. + // This is to ensure that even if application terminates, telemetry is sent to the back-end. + telemetryClient.Flush(); + Task.Delay(500000).Wait(); + } + } + + internal class MyCustomTelemetryInitializer : ITelemetryInitializer + { + public void Initialize(ITelemetry telemetry) + { + // Replace with actual properties. + (telemetry as ISupportProperties).Properties["MyCustomKey"] = "MyCustomValue"; + } + } + + internal class MyCustomTelemetryProcessor : ITelemetryProcessor + { + ITelemetryProcessor next; + + public MyCustomTelemetryProcessor(ITelemetryProcessor next) + { + this.next = next; + + } + public void Process(ITelemetry item) + { + // Example processor - not filtering out anything. + // This should be replaced with actual logic. + this.next.Process(item); + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.sln b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.sln new file mode 100644 index 0000000000..fcde30770f --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29316.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerServiceSampleWithApplicationInsights", "WorkerServiceSampleWithApplicationInsights\WorkerServiceSampleWithApplicationInsights.csproj", "{BE112B8E-1B6C-4B4F-9247-2E005134890A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE112B8E-1B6C-4B4F-9247-2E005134890A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE112B8E-1B6C-4B4F-9247-2E005134890A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE112B8E-1B6C-4B4F-9247-2E005134890A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE112B8E-1B6C-4B4F-9247-2E005134890A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F5D59060-0878-464D-BC75-D4390D487932} + EndGlobalSection +EndGlobal diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryInitializer.cs b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryInitializer.cs new file mode 100644 index 0000000000..15c9b179f8 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryInitializer.cs @@ -0,0 +1,18 @@ +using Microsoft.ApplicationInsights.Channel; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.ApplicationInsights.Extensibility; +using System; +using System.Collections.Generic; +using System.Text; + +namespace WorkerServiceSampleWithApplicationInsights +{ + public class MyCustomTelemetryInitializer : ITelemetryInitializer + { + public void Initialize(ITelemetry telemetry) + { + // Replace with actual properties. + (telemetry as ISupportProperties).Properties["MyCustomKey"] = "MyCustomValue"; + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryProcessor.cs b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryProcessor.cs new file mode 100644 index 0000000000..5d946dc688 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/MyCustomTelemetryProcessor.cs @@ -0,0 +1,25 @@ +using Microsoft.ApplicationInsights.Channel; +using Microsoft.ApplicationInsights.Extensibility; +using System; +using System.Collections.Generic; +using System.Text; + +namespace WorkerServiceSampleWithApplicationInsights +{ + public class MyCustomTelemetryProcessor : ITelemetryProcessor + { + ITelemetryProcessor next; + + public MyCustomTelemetryProcessor(ITelemetryProcessor next) + { + this.next = next; + + } + public void Process(ITelemetry item) + { + // Example processor - not filtering out anything. + // This should be replaced with actual logic. + this.next.Process(item); + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Program.cs b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Program.cs new file mode 100644 index 0000000000..68c63dd766 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Program.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace WorkerServiceSampleWithApplicationInsights +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + + // Application Insights + + // Add custom TelemetryInitializer + services.AddSingleton(); + + // Add custom TelemetryProcessor + services.AddApplicationInsightsTelemetryProcessor(); + + // Example on Configuring TelemetryModules. + // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a real api key, this is example code.")] + services.ConfigureTelemetryModule((mod, opt) => mod.AuthenticationApiKey = "put_actual_authentication_key_here"); + + // instrumentation key is read automatically from appsettings.json + services.AddApplicationInsightsTelemetryWorkerService(); + }); + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Properties/launchSettings.json b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Properties/launchSettings.json new file mode 100644 index 0000000000..7ecdeb4ae1 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "WorkerServiceSampleWithApplicationInsights": { + "commandName": "Project", + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Worker.cs b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Worker.cs new file mode 100644 index 0000000000..2a61801c43 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/Worker.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.ApplicationInsights; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace WorkerServiceSampleWithApplicationInsights +{ + public class Worker : BackgroundService + { + private readonly ILogger _logger; + private TelemetryClient tc; + private static HttpClient httpClient = new HttpClient(); + + public Worker(ILogger logger, TelemetryClient tc) + { + _logger = logger; + this.tc = tc; + } + + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + while (!stoppingToken.IsCancellationRequested) + { + // By default only Warning of above is captured. + // However the following Info level will be captured by ApplicationInsights, + // as appsettings.json configured Information level for the category 'WorkerServiceSampleWithApplicationInsights.Worker' + _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); + + using (tc.StartOperation("workeroperation")) + { + var res = httpClient.GetAsync("https://bing.com").Result.StatusCode; + _logger.LogInformation("bing http call completed with status:" + res); + } + + await Task.Delay(1000, stoppingToken); + } + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.csproj b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.csproj new file mode 100644 index 0000000000..f81a885463 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp3.0 + dotnet-WorkerServiceSampleWithApplicationInsights-E563FF63-73E2-4449-909F-BD093B43F6EF + + + + + + + diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.Development.json b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.Development.json new file mode 100644 index 0000000000..e203e9407e --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.json b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.json new file mode 100644 index 0000000000..12bce14313 --- /dev/null +++ b/examples/WorkerServiceSDK/WorkerServiceSampleWithApplicationInsights/WorkerServiceSampleWithApplicationInsights/appsettings.json @@ -0,0 +1,17 @@ +{ + "Logging": { + "ApplicationInsights": { + "LogLevel": { + "WorkerServiceSampleWithApplicationInsights.Worker": "Information" + } + }, + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "ApplicationInsights": { + "InstrumentationKey": "putactualinstrumentationkey" + } +} \ No newline at end of file From 9afaab2026f752b418211406fc4e08da30ea5661 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 9 Oct 2020 15:42:32 -0300 Subject: [PATCH 16/19] Adding upgrade of DiagnosticSource to changelog (#2087) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf13d60fde..3c0550fa7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Changelog ## VNext + - [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065) +- [Upgrade to System.Diagnostics.DiagnosticSource v5.0.0-rc.1.20451.14](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2067) - [The `{OriginalFormat}` field in ILogger will be emitted as `OriginalFormat` with the braces removed](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2071) - ApplicationInsightsLoggerProvider populates structured logging key/values irrespective of whether Scopes are enabled or not. From 63b261f796157964b0d0043c93397836ee7efece Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Wed, 14 Oct 2020 16:00:56 -0300 Subject: [PATCH 17/19] Updating DiagnosticSource to latest version (#2091) * updating diagnosticsource to latest version * updating changelog --- .../Microsoft.ApplicationInsights.csproj | 2 +- CHANGELOG.md | 2 +- .../DiagnosticSourceListener/DiagnosticSourceListener.csproj | 2 +- .../Microsoft.ApplicationInsights.AspNetCore.csproj | 2 +- .../DependencyCollector/DependencyCollector.csproj | 2 +- WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj | 2 +- WEB/Src/Web/Web/Web.csproj | 2 +- WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj index 722e546fb1..0ddedaa704 100644 --- a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj +++ b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj @@ -23,7 +23,7 @@ All - +
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c0550fa7d..61e2244826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## VNext - [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065) -- [Upgrade to System.Diagnostics.DiagnosticSource v5.0.0-rc.1.20451.14](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2067) +- [Upgrade to System.Diagnostics.DiagnosticSource v5.0.0-rc.2.20475.5](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2091) - [The `{OriginalFormat}` field in ILogger will be emitted as `OriginalFormat` with the braces removed](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2071) - ApplicationInsightsLoggerProvider populates structured logging key/values irrespective of whether Scopes are enabled or not. diff --git a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj index 8403cf5c7d..4881dc8117 100644 --- a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj +++ b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj @@ -22,7 +22,7 @@ - + diff --git a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj index 5ab227aed7..86399cd7f8 100644 --- a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj +++ b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj @@ -30,7 +30,7 @@ - + diff --git a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj index 646ae9accf..58fc3c3664 100644 --- a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj +++ b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj @@ -26,7 +26,7 @@ - + diff --git a/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj b/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj index e30605638b..100a9c66cd 100644 --- a/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj +++ b/WEB/Src/HostingStartup/HostingStartup/HostingStartup.csproj @@ -21,7 +21,7 @@ - + diff --git a/WEB/Src/Web/Web/Web.csproj b/WEB/Src/Web/Web/Web.csproj index 90e7dfe8a0..a4b1eba4d9 100644 --- a/WEB/Src/Web/Web/Web.csproj +++ b/WEB/Src/Web/Web/Web.csproj @@ -21,7 +21,7 @@ - + diff --git a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj index d7054b6a83..258339357f 100644 --- a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj +++ b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj @@ -24,7 +24,7 @@ - + From 50a86280f36580bf526c5fd75d70f4991ceebb94 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Wed, 14 Oct 2020 17:57:11 -0300 Subject: [PATCH 18/19] updating dotnet/net versions (#2092) * Updating net5 version * updating dotnet version * removing rsync and using * to simplify updates * updating from * to x Co-authored-by: Cijo Thomas --- BASE/.vsts/linux-build.yml | 9 ++------- NETCORE/.vsts/linux-build.yml | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/BASE/.vsts/linux-build.yml b/BASE/.vsts/linux-build.yml index ba78e87353..40360a2ed8 100644 --- a/BASE/.vsts/linux-build.yml +++ b/BASE/.vsts/linux-build.yml @@ -14,18 +14,13 @@ steps: - task: UseDotNet@2 displayName: install dotnet core 2.1 inputs: - version: 2.1.807 + version: 2.1.x - task: UseDotNet@2 displayName: install dotnet core 3.1 inputs: - version: 3.1.301 + version: 3.1.x -- task: CmdLine@2 - displayName: Run dotnet side by side. - inputs: - script: rsync -a ${DOTNET_ROOT/3.1.301/2.1.807}/* $DOTNET_ROOT/ - - task: DotNetCoreCLI@2 displayName: DotNetCoreCLI - Restore Solution inputs: diff --git a/NETCORE/.vsts/linux-build.yml b/NETCORE/.vsts/linux-build.yml index 9f599d5ddf..de11ffc536 100644 --- a/NETCORE/.vsts/linux-build.yml +++ b/NETCORE/.vsts/linux-build.yml @@ -27,17 +27,17 @@ steps: - task: UseDotNet@2 displayName: install dotnet core 2.1 inputs: - version: 2.1.807 + version: 2.1.x - task: UseDotNet@2 displayName: install dotnet core 3.1 inputs: - version: 3.1.301 + version: 3.1.x - task: UseDotNet@2 displayName: install dotnet 5 inputs: - version: 5.0.100-preview.8.20417.9 + version: 5.0.100-rc.2.20479.15 includePreviewVersions: true - task: DotNetCoreCLI@2 From 5fc1c713d269dcb8112d89f7082e43d221e35bce Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 16 Oct 2020 10:59:20 -0300 Subject: [PATCH 19/19] Fixing compilation issue during release (#2094) --- .../ApplicationInsightsTypes.csproj | 2 +- .../E2ETests/DependencyCollectionTests.sln | 21 ++++++++++--------- .../E2ETestAppCore20/E2ETestAppCore20.csproj | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/WEB/Test/ApplicationInsightsTypes/ApplicationInsightsTypes.csproj b/WEB/Test/ApplicationInsightsTypes/ApplicationInsightsTypes.csproj index 9934d6ba00..6fbcb51cf4 100644 --- a/WEB/Test/ApplicationInsightsTypes/ApplicationInsightsTypes.csproj +++ b/WEB/Test/ApplicationInsightsTypes/ApplicationInsightsTypes.csproj @@ -1,5 +1,5 @@ - + diff --git a/WEB/Test/E2ETests/DependencyCollectionTests.sln b/WEB/Test/E2ETests/DependencyCollectionTests.sln index aca585aa83..46003156f3 100644 --- a/WEB/Test/E2ETests/DependencyCollectionTests.sln +++ b/WEB/Test/E2ETests/DependencyCollectionTests.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29503.13 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyCollectionTests", "E2ETests\DependencyCollectionTests.csproj", "{DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E2ETestApp", "TestApps\Net452\E2ETestApp\E2ETestApp.csproj", "{F114D711-3FCB-4603-AC44-5A7E42EFC55D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E2ETestWebApi", "TestApps\Net452\E2ETestWebApi\E2ETestWebApi.csproj", "{C5D0B7FC-B9FB-4A22-8853-F0E2B0128F33}" @@ -39,10 +37,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "..\..\Src\Web\Web\We EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer", "..\..\Src\WindowsServer\WindowsServer\WindowsServer.csproj", "{3D729610-DBC2-4CDE-9969-CBDB93DB6102}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyCollector.Tests", "..\..\Src\DependencyCollector\DependencyCollector.Tests\DependencyCollector.Tests.csproj", "{444AD720-EA06-4ACA-A7C4-06A3527A61BE}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\..\..\BASE\src\Common\Common\Common.projitems*{37030556-260d-49b9-b546-72a44d0b2cb6}*SharedItemsImports = 5 ..\..\Src\Common\Common.projitems*{3d729610-dbc2-4cde-9969-cbdb93db6102}*SharedItemsImports = 5 + ..\..\Src\TestFramework\Shared\TestFramework.Shared.projitems*{444ad720-ea06-4aca-a7c4-06a3527a61be}*SharedItemsImports = 5 ..\..\Src\Common\Common.projitems*{4605eefe-6a7f-4568-a55c-5541d390b013}*SharedItemsImports = 5 ..\..\Src\Common\Common.projitems*{69638973-00ed-4468-85ce-548fe6bd859b}*SharedItemsImports = 5 ..\..\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.projitems*{69638973-00ed-4468-85ce-548fe6bd859b}*SharedItemsImports = 5 @@ -56,14 +57,6 @@ Global Release|Mixed Platforms = Release|Mixed Platforms EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Release|Any CPU.Build.0 = Release|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB992B10-D3D8-4DA1-815A-A2F5B7F3C18C}.Release|Mixed Platforms.Build.0 = Release|Any CPU {F114D711-3FCB-4603-AC44-5A7E42EFC55D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F114D711-3FCB-4603-AC44-5A7E42EFC55D}.Debug|Any CPU.Build.0 = Debug|Any CPU {F114D711-3FCB-4603-AC44-5A7E42EFC55D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -168,6 +161,14 @@ Global {3D729610-DBC2-4CDE-9969-CBDB93DB6102}.Release|Any CPU.Build.0 = Release|Any CPU {3D729610-DBC2-4CDE-9969-CBDB93DB6102}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {3D729610-DBC2-4CDE-9969-CBDB93DB6102}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Release|Any CPU.Build.0 = Release|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {444AD720-EA06-4ACA-A7C4-06A3527A61BE}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj b/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj index 93e49372bc..d778c62a61 100644 --- a/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj +++ b/WEB/Test/E2ETests/TestApps/NetCore20/E2ETestAppCore20/E2ETestAppCore20.csproj @@ -31,7 +31,7 @@ - +