From 38fc955b3dc81b08055d71cdd6b804e2f72481de Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Fri, 22 Mar 2024 08:42:10 +0000 Subject: [PATCH] Add docs and rename examples --- Elastic.OpenTelemetry.sln | 42 +++-- README.md | 161 +++++++++++++++++- .../Controllers/E2EController.cs | 2 +- .../Controllers/HomeController.cs | 5 +- .../Example.AspNetCore.Mvc.csproj} | 0 .../Models/ErrorViewModel.cs | 3 +- .../Program.cs | 0 .../Properties/launchSettings.json | 0 .../Views/E2E/Index.cshtml | 0 .../Views/Home/Index.cshtml | 0 .../Views/Home/Privacy.cshtml | 0 .../Views/Shared/Error.cshtml | 0 .../Views/Shared/_Layout.cshtml | 0 .../Views/Shared/_Layout.cshtml.css | 0 .../Shared/_ValidationScriptsPartial.cshtml | 0 .../Views/_ViewImports.cshtml | 0 .../Views/_ViewStart.cshtml | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 .../wwwroot/css/site.css | 0 .../wwwroot/favicon.ico | Bin .../wwwroot/js/site.js | 0 .../wwwroot/lib/bootstrap/LICENSE | 0 .../lib/bootstrap/dist/css/bootstrap-grid.css | 0 .../bootstrap/dist/css/bootstrap-grid.css.map | 0 .../bootstrap/dist/css/bootstrap-grid.min.css | 0 .../dist/css/bootstrap-grid.min.css.map | 0 .../bootstrap/dist/css/bootstrap-grid.rtl.css | 0 .../dist/css/bootstrap-grid.rtl.css.map | 0 .../dist/css/bootstrap-grid.rtl.min.css | 0 .../dist/css/bootstrap-grid.rtl.min.css.map | 0 .../bootstrap/dist/css/bootstrap-reboot.css | 0 .../dist/css/bootstrap-reboot.css.map | 0 .../dist/css/bootstrap-reboot.min.css | 0 .../dist/css/bootstrap-reboot.min.css.map | 0 .../dist/css/bootstrap-reboot.rtl.css | 0 .../dist/css/bootstrap-reboot.rtl.css.map | 0 .../dist/css/bootstrap-reboot.rtl.min.css | 0 .../dist/css/bootstrap-reboot.rtl.min.css.map | 0 .../dist/css/bootstrap-utilities.css | 0 .../dist/css/bootstrap-utilities.css.map | 0 .../dist/css/bootstrap-utilities.min.css | 0 .../dist/css/bootstrap-utilities.min.css.map | 0 .../dist/css/bootstrap-utilities.rtl.css | 0 .../dist/css/bootstrap-utilities.rtl.css.map | 0 .../dist/css/bootstrap-utilities.rtl.min.css | 0 .../css/bootstrap-utilities.rtl.min.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.css | 0 .../lib/bootstrap/dist/css/bootstrap.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.min.css | 0 .../bootstrap/dist/css/bootstrap.min.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.rtl.css | 0 .../bootstrap/dist/css/bootstrap.rtl.css.map | 0 .../bootstrap/dist/css/bootstrap.rtl.min.css | 0 .../dist/css/bootstrap.rtl.min.css.map | 0 .../lib/bootstrap/dist/js/bootstrap.bundle.js | 0 .../bootstrap/dist/js/bootstrap.bundle.js.map | 0 .../bootstrap/dist/js/bootstrap.bundle.min.js | 0 .../dist/js/bootstrap.bundle.min.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.esm.js | 0 .../bootstrap/dist/js/bootstrap.esm.js.map | 0 .../bootstrap/dist/js/bootstrap.esm.min.js | 0 .../dist/js/bootstrap.esm.min.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.js | 0 .../lib/bootstrap/dist/js/bootstrap.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.min.js | 0 .../bootstrap/dist/js/bootstrap.min.js.map | 0 .../jquery-validation-unobtrusive/LICENSE.txt | 0 .../jquery.validate.unobtrusive.js | 0 .../jquery.validate.unobtrusive.min.js | 0 .../wwwroot/lib/jquery-validation/LICENSE.md | 0 .../dist/additional-methods.js | 0 .../dist/additional-methods.min.js | 0 .../jquery-validation/dist/jquery.validate.js | 0 .../dist/jquery.validate.min.js | 0 .../wwwroot/lib/jquery/LICENSE.txt | 0 .../wwwroot/lib/jquery/dist/jquery.js | 0 .../wwwroot/lib/jquery/dist/jquery.min.js | 0 .../wwwroot/lib/jquery/dist/jquery.min.map | 0 .../Example.Console.csproj} | 0 .../Program.cs | 3 +- .../Properties/launchSettings.json | 0 .../Usage.cs | 3 +- examples/Example.MinimalApi/Program.cs | 7 +- .../Example.WorkerService.csproj} | 0 .../Program.cs | 2 +- .../Properties/launchSettings.json | 0 .../Worker.cs | 3 +- .../appsettings.Development.json | 0 .../appsettings.json | 0 .../AgentBuilderOptions.cs | 2 +- .../DistributedApplicationFixture.cs | 9 +- .../DotNetRunApplication.cs | 11 +- .../ServiceTests.cs | 2 +- 94 files changed, 206 insertions(+), 49 deletions(-) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Controllers/E2EController.cs (95%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Controllers/HomeController.cs (91%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore/Example.Elastic.OpenTelemetry.AspNetCore.csproj => Example.AspNetCore.Mvc/Example.AspNetCore.Mvc.csproj} (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Models/ErrorViewModel.cs (85%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Program.cs (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Properties/launchSettings.json (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/E2E/Index.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Home/Index.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Home/Privacy.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Shared/Error.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Shared/_Layout.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Shared/_Layout.cshtml.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/Shared/_ValidationScriptsPartial.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/_ViewImports.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/Views/_ViewStart.cshtml (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/appsettings.Development.json (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/appsettings.json (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/css/site.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/favicon.ico (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/js/site.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/LICENSE (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation/LICENSE.md (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation/dist/additional-methods.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation/dist/additional-methods.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation/dist/jquery.validate.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery/LICENSE.txt (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery/dist/jquery.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery/dist/jquery.min.js (100%) rename examples/{Example.Elastic.OpenTelemetry.AspNetCore => Example.AspNetCore.Mvc}/wwwroot/lib/jquery/dist/jquery.min.map (100%) rename examples/{Example.Elastic.OpenTelemetry/Example.Elastic.OpenTelemetry.csproj => Example.Console/Example.Console.csproj} (100%) rename examples/{Example.Elastic.OpenTelemetry => Example.Console}/Program.cs (90%) rename examples/{Example.Elastic.OpenTelemetry => Example.Console}/Properties/launchSettings.json (100%) rename examples/{Example.Elastic.OpenTelemetry => Example.Console}/Usage.cs (99%) rename examples/{Example.Elastic.OpenTelemetry.Worker/Example.Elastic.OpenTelemetry.Worker.csproj => Example.WorkerService/Example.WorkerService.csproj} (100%) rename examples/{Example.Elastic.OpenTelemetry.Worker => Example.WorkerService}/Program.cs (93%) rename examples/{Example.Elastic.OpenTelemetry.Worker => Example.WorkerService}/Properties/launchSettings.json (100%) rename examples/{Example.Elastic.OpenTelemetry.Worker => Example.WorkerService}/Worker.cs (97%) rename examples/{Example.Elastic.OpenTelemetry.Worker => Example.WorkerService}/appsettings.Development.json (100%) rename examples/{Example.Elastic.OpenTelemetry.Worker => Example.WorkerService}/appsettings.json (100%) diff --git a/Elastic.OpenTelemetry.sln b/Elastic.OpenTelemetry.sln index 5de00f5..dab4d7d 100644 --- a/Elastic.OpenTelemetry.sln +++ b/Elastic.OpenTelemetry.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.9.34321.82 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.OpenTelemetry", "src\Elastic.OpenTelemetry\Elastic.OpenTelemetry.csproj", "{79C08F0E-7220-486C-AC0C-E3B287EB0B18}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Elastic.OpenTelemetry", "examples\Example.Elastic.OpenTelemetry\Example.Elastic.OpenTelemetry.csproj", "{32DF4F56-1773-49E9-A8AE-0573F0AA57DE}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E622CFF2-C6C4-40FB-BE42-7C4F2B38B75A}" ProjectSection(SolutionItems) = preProject src\Directory.Build.props = src\Directory.Build.props @@ -29,15 +27,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.OpenTelemetry.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = ".github", ".github\.github.csproj", "{B701E33D-D777-4BD4-A4EC-1F63FE69AF7A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Elastic.OpenTelemetry.AspNetCore", "examples\Example.Elastic.OpenTelemetry.AspNetCore\Example.Elastic.OpenTelemetry.AspNetCore.csproj", "{EC81FA30-C765-4F04-8679-86F16DA3CC65}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.OpenTelemetry.EndToEndTests", "tests\Elastic.OpenTelemetry.EndToEndTests\Elastic.OpenTelemetry.EndToEndTests.csproj", "{B970DBE1-6A04-4014-A285-6A9F36421025}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Elastic.OpenTelemetry.Worker", "examples\Example.Elastic.OpenTelemetry.Worker\Example.Elastic.OpenTelemetry.Worker.csproj", "{4377A059-16E0-4D5D-AC03-44C09BCE5BC4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.MinimalApi", "examples\Example.MinimalApi\Example.MinimalApi.csproj", "{397D7E8D-39C2-41D6-9D4D-F1D35666926A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.OpenTelemetry.EndToEndTests", "tests\Elastic.OpenTelemetry.EndToEndTests\Elastic.OpenTelemetry.EndToEndTests.csproj", "{B970DBE1-6A04-4014-A285-6A9F36421025}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.AspNetCore.Mvc", "examples\Example.AspNetCore.Mvc\Example.AspNetCore.Mvc.csproj", "{6D7D5234-BE86-46E0-A871-153FE96CD644}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.OpenTelemetry.AspNetCore", "src\Elastic.OpenTelemetry.AspNetCore\Elastic.OpenTelemetry.AspNetCore.csproj", "{2139F902-B10D-475D-8A38-F78962CEBFD3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Console", "examples\Example.Console\Example.Console.csproj", "{849FAC2E-8303-4154-8560-31B22194800E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.MinimalApi", "examples\Example.MinimalApi\Example.MinimalApi.csproj", "{397D7E8D-39C2-41D6-9D4D-F1D35666926A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.WorkerService", "examples\Example.WorkerService\Example.WorkerService.csproj", "{863CAB86-5EB0-4E9F-B01D-F51687EC6597}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -49,10 +47,6 @@ Global {79C08F0E-7220-486C-AC0C-E3B287EB0B18}.Debug|Any CPU.Build.0 = Debug|Any CPU {79C08F0E-7220-486C-AC0C-E3B287EB0B18}.Release|Any CPU.ActiveCfg = Release|Any CPU {79C08F0E-7220-486C-AC0C-E3B287EB0B18}.Release|Any CPU.Build.0 = Release|Any CPU - {32DF4F56-1773-49E9-A8AE-0573F0AA57DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32DF4F56-1773-49E9-A8AE-0573F0AA57DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32DF4F56-1773-49E9-A8AE-0573F0AA57DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32DF4F56-1773-49E9-A8AE-0573F0AA57DE}.Release|Any CPU.Build.0 = Release|Any CPU {872D0721-A4F2-405C-B0AB-036B340F1907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {872D0721-A4F2-405C-B0AB-036B340F1907}.Debug|Any CPU.Build.0 = Debug|Any CPU {872D0721-A4F2-405C-B0AB-036B340F1907}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -69,14 +63,6 @@ Global {B701E33D-D777-4BD4-A4EC-1F63FE69AF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU {B701E33D-D777-4BD4-A4EC-1F63FE69AF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU {B701E33D-D777-4BD4-A4EC-1F63FE69AF7A}.Release|Any CPU.Build.0 = Release|Any CPU - {EC81FA30-C765-4F04-8679-86F16DA3CC65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC81FA30-C765-4F04-8679-86F16DA3CC65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC81FA30-C765-4F04-8679-86F16DA3CC65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC81FA30-C765-4F04-8679-86F16DA3CC65}.Release|Any CPU.Build.0 = Release|Any CPU - {4377A059-16E0-4D5D-AC03-44C09BCE5BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4377A059-16E0-4D5D-AC03-44C09BCE5BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4377A059-16E0-4D5D-AC03-44C09BCE5BC4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4377A059-16E0-4D5D-AC03-44C09BCE5BC4}.Release|Any CPU.Build.0 = Release|Any CPU {B970DBE1-6A04-4014-A285-6A9F36421025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B970DBE1-6A04-4014-A285-6A9F36421025}.Debug|Any CPU.Build.0 = Debug|Any CPU {B970DBE1-6A04-4014-A285-6A9F36421025}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -85,18 +71,30 @@ Global {397D7E8D-39C2-41D6-9D4D-F1D35666926A}.Debug|Any CPU.Build.0 = Debug|Any CPU {397D7E8D-39C2-41D6-9D4D-F1D35666926A}.Release|Any CPU.ActiveCfg = Release|Any CPU {397D7E8D-39C2-41D6-9D4D-F1D35666926A}.Release|Any CPU.Build.0 = Release|Any CPU + {6D7D5234-BE86-46E0-A871-153FE96CD644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D7D5234-BE86-46E0-A871-153FE96CD644}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D7D5234-BE86-46E0-A871-153FE96CD644}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D7D5234-BE86-46E0-A871-153FE96CD644}.Release|Any CPU.Build.0 = Release|Any CPU + {849FAC2E-8303-4154-8560-31B22194800E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {849FAC2E-8303-4154-8560-31B22194800E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {849FAC2E-8303-4154-8560-31B22194800E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {849FAC2E-8303-4154-8560-31B22194800E}.Release|Any CPU.Build.0 = Release|Any CPU + {863CAB86-5EB0-4E9F-B01D-F51687EC6597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {863CAB86-5EB0-4E9F-B01D-F51687EC6597}.Debug|Any CPU.Build.0 = Debug|Any CPU + {863CAB86-5EB0-4E9F-B01D-F51687EC6597}.Release|Any CPU.ActiveCfg = Release|Any CPU + {863CAB86-5EB0-4E9F-B01D-F51687EC6597}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {79C08F0E-7220-486C-AC0C-E3B287EB0B18} = {E622CFF2-C6C4-40FB-BE42-7C4F2B38B75A} - {32DF4F56-1773-49E9-A8AE-0573F0AA57DE} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} {22BF9223-3A6D-4197-8527-3E4E43A98A81} = {AAD39891-0B70-47FA-A212-43E1AAE5DF56} - {EC81FA30-C765-4F04-8679-86F16DA3CC65} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} - {4377A059-16E0-4D5D-AC03-44C09BCE5BC4} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} {B970DBE1-6A04-4014-A285-6A9F36421025} = {AAD39891-0B70-47FA-A212-43E1AAE5DF56} {397D7E8D-39C2-41D6-9D4D-F1D35666926A} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} + {6D7D5234-BE86-46E0-A871-153FE96CD644} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} + {849FAC2E-8303-4154-8560-31B22194800E} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} + {863CAB86-5EB0-4E9F-B01D-F51687EC6597} = {4E95C87B-655B-4BC3-8F2A-DF06B7AAB7E9} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {573B2B5F-8CBB-4D52-A55A-4E65E282AAFB} diff --git a/README.md b/README.md index 262ead6..5fe4ffa 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,163 @@ # Elastic OpenTelemetry Distribution -This is Elastic's distribution of OpenTelemetry for .NET. +The `Elastic.OpenTelemetry` package contains an Elastic distribution of the +[OpenTelemetry SDK for .NET](https://opentelemetry.io/docs/languages/net). A distribution +is a wrapper around an upstream OpenTelemetry repository with some customizations. For +more details about distributions in general, visit the +[OpenTelemetry documentation](https://opentelemetry.io/docs/concepts/distributions). -## Getting Started +The Elastic distribution includes some Elastic-specific processors to ensure the best +compatibility when exporting OpenTelemetry signal data to an Elastic backend such +as Elastic APM server. The distribution also preconfigures the collection of tracing +and metrics signals, applying some opinionated defaults, such as which sources are +collected by default. The distribution also ensures that the OTLP exporter is enabled +by default. -TODO \ No newline at end of file +The distribution includes extension methods to fully control the creation of the +underlying tracer and metric providers, providing a helpful set of defaults +to get developers up and running quickly with collecting and exporting OpenTelemetry +signals. + +## Getting started + +This guide will show you how to get started with Elastic OpenTelemetry distribution for .NET. + +As the distribution is a lightweight wrapper around the OpenTelemetry SDK, you should be broadly +familiar with the OpenTelemetry SDK concepts and instrumenting applications using the Microsoft +diagnostic APIs. If you are not, we recommend you read the +[OpenTelemetry SDK documentation](https://opentelemetry.io/docs/languages/net) first. + +> **_IMPORTANT:_** The Elastic distribution is currently in early alpha release status. It is not yet feature +complete and may contain bugs. We are actively working on improving the distribution and +adding new features. +> +> If you would like to experience the alpha and help us improve the distribution by providing +early feedback, you can follow the steps below to get started. + +### Prerequisites + +The current documentation and examples are written with .NET 6 and newer applications in mind. +Before continuing, ensure that you have a supported +[.NET SDK version](https://dotnet.microsoft.com/en-us/download/dotnet) installed locally. + +### Installation + +To get started with the Elastic OpenTelemetry distribution, you must add the Elastic OpenTelemetry +NuGet package to your project. This can be achieved by adding the package reference to your project file. + +``` + +``` + +After adding the package reference, you can start using the Elastic OpenTelemetry distribution +in your application. The distribution includes a transitive dependency on the OpenTelemetry SDK, +so you do not need to add the OpenTelemetry SDK package to your project, although doing so will +cause no harm and may be used to opt into newer SDK versions before the Elastic distribution +references them. + +The Elastic OpenTelemetry distribution is designed to be easy to use and integrate into your +applications. This includes applications which have previously used the OpenTelemetry SDK directly. +In situations where the OpenTelemetry SDK is already used, the only required change is +to add the `Elastic.OpenTelemetry` NuGet package to the project. Doing so will automatically +switch to the opinionated configuration provided by the Elastic distribution. + +### ASP.NET Core usage + +A common requirement is to instrument ASP.NET Core applications based on the `Microsoft.Extensions.Hosting` +libraries which provide dependency injection via an `IServiceProvider`. + +The OpenTelemetry SDK and the Elastic distribution provide extension methods to enable observability +features in your application by adding a few lines of code. + +In this section, we'll focus on instrumenting an ASP.NET Core minimal API application using the Elastic +OpenTelemetry distribution. Similar steps can also be used to instrument other ASP.NET Core workloads +and other host-based applications such as [worker services](https://learn.microsoft.com/en-us/dotnet/core/extensions/workers). + +> **_NOTE:_** These examples assume the use of the top-level statements feature introduced in C# 9.0 and the +default choice for applications created using the latest templates. + +To take advantage of the OpenTelemetry SDK instrumentation for ASP.NET Core, add the following +NuGet package to your project: + +``` + +``` + +This package includes instrumentation to collect traces for requests handled by ASP.NET Core endpoints. + +> **_NOTE:_** The ASP.NET Core instrumentation is not included by default in the Elastic OpenTelemetry distribution. +As with all optional instrumentation libraries, you can choose to include them in your application by +adding a suitable package reference. + +Inside the `Program.cs` file of the ASP.NET Core application, add the following two using directives: + +```c# +using OpenTelemetry; +using OpenTelemetry.Trace; +``` + +The OpenTelemetry SDK provides extension methods on the `IServiceCollection` to support enabling the +providers and configuring the SDK. The Elastic distribution overrides the default SDK registration, +adding several opinionated defaults. + +In the minimal API template, the `WebApplicationBuilder` exposes a `Services` property that can be used +to register services with the dependency injection container. To enable tracing and metrics collection, +ensure that the OpenTelemetry SDK is registered. + +```c# +var builder = WebApplication.CreateBuilder(args); + +builder.Services + .AddHttpClient() <1> + .AddOpenTelemetry() <2> + .WithTracing(t => t.AddAspNetCoreInstrumentation()); <3> +``` +<1> The `AddHttpClient` method registers the `IHttpClientFactory` service with the dependency +injection container. This is NOT required to enable OpenTelemetry, but the example endpoint will use it to +send an HTTP request. + +<2> The `AddOpenTelemetry` method registers the OpenTelemetry SDK with the dependency injection +container. When available, the Elastic distribution will override this to add opinionated defaults. + +<3> Configure tracing to instrument requests handled by ASP.NET Core. + +With these limited changes to the `Program.cs` file, the application is now configured to use the +OpenTelemetry SDK and the Elastic distribution to collect traces and metrics, which are exported via +OTLP. + +To demonstrate the tracing capabilities, add a simple endpoint to the application: + +```c# +app.MapGet("/", async (IHttpClientFactory httpClientFactory) => +{ + using var client = httpClientFactory.CreateClient(); + + await Task.Delay(100); + var response = await client.GetAsync("http://elastic.co"); <1> + await Task.Delay(50); + + return response.StatusCode == System.Net.HttpStatusCode.OK ? Results.Ok() : Results.StatusCode(500); +}); +``` +<1> Using this URL will require two redirects, allowing us to see multiple spans in the trace. + +The Elastic distribution will automatically enable the exporting of signals via the OTLP exporter. This +exporter requires that endpoint(s) are configured. A common mechanism for configuring endpoints is +via environment variables. + +This demo uses an Elastic Cloud deployment as the destination for our observability data. From Kibana +running in Elastic Cloud, navigate to the observability set up guides. Select the OpenTelemetry option +to view the configuration details that should be supplied to the application. + +![Elastic Cloud OpenTelemetry configuration](docs/images/elastic-cloud-opentelemetry-configuration.png) + +Configure environment variables for the application either in `launchSettings.json` or in the environment +where the application is running. + +Once configured, run the application and make a request to the root endpoint. A trace will be generated +and exported to the OTLP endpoint. + +To view the traces, you can use the Elastic APM UI. + +![Minimal API request trace sample in the Elastic APM UI](docs/images/trace-sample-minimal-api.png) \ No newline at end of file diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/E2EController.cs b/examples/Example.AspNetCore.Mvc/Controllers/E2EController.cs similarity index 95% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/E2EController.cs rename to examples/Example.AspNetCore.Mvc/Controllers/E2EController.cs index d088529..1d246b7 100644 --- a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/E2EController.cs +++ b/examples/Example.AspNetCore.Mvc/Controllers/E2EController.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; -namespace Example.Elastic.OpenTelemetry.AspNetCore.Controllers; +namespace Example.AspNetCore.Mvc.Controllers; public class E2EController : Controller { diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/HomeController.cs b/examples/Example.AspNetCore.Mvc/Controllers/HomeController.cs similarity index 91% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/HomeController.cs rename to examples/Example.AspNetCore.Mvc/Controllers/HomeController.cs index 6f1a26a..52db681 100644 --- a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Controllers/HomeController.cs +++ b/examples/Example.AspNetCore.Mvc/Controllers/HomeController.cs @@ -1,12 +1,13 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information + using System.Diagnostics; using System.Net; -using Example.Elastic.OpenTelemetry.AspNetCore.Models; +using Example.AspNetCore.Mvc.Models; using Microsoft.AspNetCore.Mvc; -namespace Example.Elastic.OpenTelemetry.AspNetCore.Controllers; +namespace Example.AspNetCore.Mvc.Controllers; public class HomeController(IHttpClientFactory httpClientFactory) : Controller { diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Example.Elastic.OpenTelemetry.AspNetCore.csproj b/examples/Example.AspNetCore.Mvc/Example.AspNetCore.Mvc.csproj similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Example.Elastic.OpenTelemetry.AspNetCore.csproj rename to examples/Example.AspNetCore.Mvc/Example.AspNetCore.Mvc.csproj diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Models/ErrorViewModel.cs b/examples/Example.AspNetCore.Mvc/Models/ErrorViewModel.cs similarity index 85% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Models/ErrorViewModel.cs rename to examples/Example.AspNetCore.Mvc/Models/ErrorViewModel.cs index c8d130c..28575c2 100644 --- a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Models/ErrorViewModel.cs +++ b/examples/Example.AspNetCore.Mvc/Models/ErrorViewModel.cs @@ -1,7 +1,8 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -namespace Example.Elastic.OpenTelemetry.AspNetCore.Models + +namespace Example.AspNetCore.Mvc.Models { public class ErrorViewModel { diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Program.cs b/examples/Example.AspNetCore.Mvc/Program.cs similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Program.cs rename to examples/Example.AspNetCore.Mvc/Program.cs diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Properties/launchSettings.json b/examples/Example.AspNetCore.Mvc/Properties/launchSettings.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Properties/launchSettings.json rename to examples/Example.AspNetCore.Mvc/Properties/launchSettings.json diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/E2E/Index.cshtml b/examples/Example.AspNetCore.Mvc/Views/E2E/Index.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/E2E/Index.cshtml rename to examples/Example.AspNetCore.Mvc/Views/E2E/Index.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Home/Index.cshtml b/examples/Example.AspNetCore.Mvc/Views/Home/Index.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Home/Index.cshtml rename to examples/Example.AspNetCore.Mvc/Views/Home/Index.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Home/Privacy.cshtml b/examples/Example.AspNetCore.Mvc/Views/Home/Privacy.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Home/Privacy.cshtml rename to examples/Example.AspNetCore.Mvc/Views/Home/Privacy.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/Error.cshtml b/examples/Example.AspNetCore.Mvc/Views/Shared/Error.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/Error.cshtml rename to examples/Example.AspNetCore.Mvc/Views/Shared/Error.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_Layout.cshtml b/examples/Example.AspNetCore.Mvc/Views/Shared/_Layout.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_Layout.cshtml rename to examples/Example.AspNetCore.Mvc/Views/Shared/_Layout.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_Layout.cshtml.css b/examples/Example.AspNetCore.Mvc/Views/Shared/_Layout.cshtml.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_Layout.cshtml.css rename to examples/Example.AspNetCore.Mvc/Views/Shared/_Layout.cshtml.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_ValidationScriptsPartial.cshtml b/examples/Example.AspNetCore.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/Shared/_ValidationScriptsPartial.cshtml rename to examples/Example.AspNetCore.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/_ViewImports.cshtml b/examples/Example.AspNetCore.Mvc/Views/_ViewImports.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/_ViewImports.cshtml rename to examples/Example.AspNetCore.Mvc/Views/_ViewImports.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/_ViewStart.cshtml b/examples/Example.AspNetCore.Mvc/Views/_ViewStart.cshtml similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/Views/_ViewStart.cshtml rename to examples/Example.AspNetCore.Mvc/Views/_ViewStart.cshtml diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/appsettings.Development.json b/examples/Example.AspNetCore.Mvc/appsettings.Development.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/appsettings.Development.json rename to examples/Example.AspNetCore.Mvc/appsettings.Development.json diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/appsettings.json b/examples/Example.AspNetCore.Mvc/appsettings.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/appsettings.json rename to examples/Example.AspNetCore.Mvc/appsettings.json diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/css/site.css b/examples/Example.AspNetCore.Mvc/wwwroot/css/site.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/css/site.css rename to examples/Example.AspNetCore.Mvc/wwwroot/css/site.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/favicon.ico b/examples/Example.AspNetCore.Mvc/wwwroot/favicon.ico similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/favicon.ico rename to examples/Example.AspNetCore.Mvc/wwwroot/favicon.ico diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/js/site.js b/examples/Example.AspNetCore.Mvc/wwwroot/js/site.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/js/site.js rename to examples/Example.AspNetCore.Mvc/wwwroot/js/site.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/LICENSE b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/LICENSE similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/LICENSE rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/LICENSE diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/LICENSE.md b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/LICENSE.md similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/LICENSE.md rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/LICENSE.md diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/additional-methods.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/additional-methods.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/additional-methods.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/additional-methods.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/jquery.validate.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/jquery.validate.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/LICENSE.txt b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/LICENSE.txt similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/LICENSE.txt rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/LICENSE.txt diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.min.js b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.min.js similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.min.js rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.min.js diff --git a/examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.min.map b/examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.min.map similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.AspNetCore/wwwroot/lib/jquery/dist/jquery.min.map rename to examples/Example.AspNetCore.Mvc/wwwroot/lib/jquery/dist/jquery.min.map diff --git a/examples/Example.Elastic.OpenTelemetry/Example.Elastic.OpenTelemetry.csproj b/examples/Example.Console/Example.Console.csproj similarity index 100% rename from examples/Example.Elastic.OpenTelemetry/Example.Elastic.OpenTelemetry.csproj rename to examples/Example.Console/Example.Console.csproj diff --git a/examples/Example.Elastic.OpenTelemetry/Program.cs b/examples/Example.Console/Program.cs similarity index 90% rename from examples/Example.Elastic.OpenTelemetry/Program.cs rename to examples/Example.Console/Program.cs index 4544a3a..9c895d1 100644 --- a/examples/Example.Elastic.OpenTelemetry/Program.cs +++ b/examples/Example.Console/Program.cs @@ -1,7 +1,8 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -using Example.Elastic.OpenTelemetry; + +using Example.Console; Console.WriteLine("Starting sample application."); diff --git a/examples/Example.Elastic.OpenTelemetry/Properties/launchSettings.json b/examples/Example.Console/Properties/launchSettings.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry/Properties/launchSettings.json rename to examples/Example.Console/Properties/launchSettings.json diff --git a/examples/Example.Elastic.OpenTelemetry/Usage.cs b/examples/Example.Console/Usage.cs similarity index 99% rename from examples/Example.Elastic.OpenTelemetry/Usage.cs rename to examples/Example.Console/Usage.cs index e8b7026..d49eb8c 100644 --- a/examples/Example.Elastic.OpenTelemetry/Usage.cs +++ b/examples/Example.Console/Usage.cs @@ -1,6 +1,7 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information + using System.Diagnostics; using Elastic.OpenTelemetry; using Elastic.OpenTelemetry.Extensions; @@ -8,7 +9,7 @@ using OpenTelemetry.Resources; using OpenTelemetry.Trace; -namespace Example.Elastic.OpenTelemetry; +namespace Example.Console; internal static class Usage { diff --git a/examples/Example.MinimalApi/Program.cs b/examples/Example.MinimalApi/Program.cs index 58d891e..07542c6 100644 --- a/examples/Example.MinimalApi/Program.cs +++ b/examples/Example.MinimalApi/Program.cs @@ -1,3 +1,7 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + using System.Diagnostics; using Example.Api; using OpenTelemetry; @@ -8,7 +12,8 @@ builder.Services .AddHttpClient() // Adds IHttpClientFactory .AddOpenTelemetry() // Adds the OpenTelemetry SDK - .WithTracing(t => { + .WithTracing(t => + { t.AddAspNetCoreInstrumentation(); // Configure tracing to instrument ASP.NET Core t.AddSource(Api.ActivitySourceName); }); diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/Example.Elastic.OpenTelemetry.Worker.csproj b/examples/Example.WorkerService/Example.WorkerService.csproj similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.Worker/Example.Elastic.OpenTelemetry.Worker.csproj rename to examples/Example.WorkerService/Example.WorkerService.csproj diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/Program.cs b/examples/Example.WorkerService/Program.cs similarity index 93% rename from examples/Example.Elastic.OpenTelemetry.Worker/Program.cs rename to examples/Example.WorkerService/Program.cs index e69dcb2..773ce0c 100644 --- a/examples/Example.Elastic.OpenTelemetry.Worker/Program.cs +++ b/examples/Example.WorkerService/Program.cs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -using Example.Elastic.OpenTelemetry.Worker; +using Example.WorkerService; using OpenTelemetry; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/Properties/launchSettings.json b/examples/Example.WorkerService/Properties/launchSettings.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.Worker/Properties/launchSettings.json rename to examples/Example.WorkerService/Properties/launchSettings.json diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/Worker.cs b/examples/Example.WorkerService/Worker.cs similarity index 97% rename from examples/Example.Elastic.OpenTelemetry.Worker/Worker.cs rename to examples/Example.WorkerService/Worker.cs index a587058..b3b0792 100644 --- a/examples/Example.Elastic.OpenTelemetry.Worker/Worker.cs +++ b/examples/Example.WorkerService/Worker.cs @@ -1,10 +1,11 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information + using System.Diagnostics; using System.Diagnostics.Metrics; -namespace Example.Elastic.OpenTelemetry.Worker; +namespace Example.WorkerService; public class Worker(ILogger logger) : BackgroundService { diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/appsettings.Development.json b/examples/Example.WorkerService/appsettings.Development.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.Worker/appsettings.Development.json rename to examples/Example.WorkerService/appsettings.Development.json diff --git a/examples/Example.Elastic.OpenTelemetry.Worker/appsettings.json b/examples/Example.WorkerService/appsettings.json similarity index 100% rename from examples/Example.Elastic.OpenTelemetry.Worker/appsettings.json rename to examples/Example.WorkerService/appsettings.json diff --git a/src/Elastic.OpenTelemetry/AgentBuilderOptions.cs b/src/Elastic.OpenTelemetry/AgentBuilderOptions.cs index 5e4c4fe..23f5520 100644 --- a/src/Elastic.OpenTelemetry/AgentBuilderOptions.cs +++ b/src/Elastic.OpenTelemetry/AgentBuilderOptions.cs @@ -1,4 +1,4 @@ -// Licensed to Elasticsearch B.V under one or more agreements. +// Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information diff --git a/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DistributedApplicationFixture.cs b/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DistributedApplicationFixture.cs index 352ee4e..44b584c 100644 --- a/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DistributedApplicationFixture.cs +++ b/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DistributedApplicationFixture.cs @@ -6,9 +6,7 @@ using System.Security.Cryptography; using System.Text; using Microsoft.Extensions.Configuration; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Nullean.Xunit.Partitions.Sdk; -using Xunit.Sdk; namespace Elastic.OpenTelemetry.EndToEndTests.DistributedFixture; @@ -20,7 +18,7 @@ public class DistributedApplicationFixture : IPartitionLifetime public bool Started => AspNetApplication?.ProcessId.HasValue ?? false; - private readonly List _output = new(); + private readonly List _output = []; public int? MaxConcurrency => null; @@ -55,7 +53,7 @@ public string FailureTestOutput() { var logLines = new List(); if (_aspNetApplication?.ProcessId.HasValue ?? false) - AspNetApplication.IterateOverLog(s => + DotNetRunApplication.IterateOverLog(s => { Console.WriteLine(s); logLines.Add(s); @@ -113,13 +111,12 @@ public async Task InitializeAsync() await ApmUI.InitializeAsync(); } - } public class AspNetCoreExampleApplication : DotNetRunApplication { public AspNetCoreExampleApplication(string serviceName, IConfiguration configuration) - : base(serviceName, configuration, "Example.Elastic.OpenTelemetry.AspNetCore") => + : base(serviceName, configuration, "Example.AspNetCore.Mvc") => HttpClient = new HttpClient { BaseAddress = new Uri("http://localhost:5247") }; public HttpClient HttpClient { get; } diff --git a/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DotNetRunApplication.cs b/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DotNetRunApplication.cs index c9d4aef..f112b3c 100644 --- a/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DotNetRunApplication.cs +++ b/tests/Elastic.OpenTelemetry.EndToEndTests/DistributedFixture/DotNetRunApplication.cs @@ -36,7 +36,7 @@ protected DotNetRunApplication(string serviceName, IConfiguration configuration, public int? ProcessId { get; private set; } - protected virtual string[] GetArguments() => Array.Empty(); + protected virtual string[] GetArguments() => []; public static DirectoryInfo GetSolutionRoot() { @@ -61,7 +61,6 @@ private LongRunningArguments CreateStartArgs() return new("dotnet", arguments) { - Environment = new Dictionary { { "OTEL_EXPORTER_OTLP_ENDPOINT", _endpoint }, @@ -88,20 +87,18 @@ private LongRunningArguments CreateStartArgs() return l.Line.StartsWith(" Application started."); } }; - - } - public void IterateOverLog(Action write) + public static void IterateOverLog(Action write) { - var logFile = DotNetRunApplication.LogDirectory + var logFile = LogDirectory //TODO get last of this app specifically //.GetFiles($"{_app.Process.Binary}_*.log") .GetFiles($"*.log") .MaxBy(f => f.CreationTimeUtc); if (logFile == null) - write($"Could not locate log files in {DotNetRunApplication.LogDirectory}"); + write($"Could not locate log files in {LogDirectory}"); else { write($"Contents of: {logFile.FullName}"); diff --git a/tests/Elastic.OpenTelemetry.EndToEndTests/ServiceTests.cs b/tests/Elastic.OpenTelemetry.EndToEndTests/ServiceTests.cs index 8725a6f..6f39281 100644 --- a/tests/Elastic.OpenTelemetry.EndToEndTests/ServiceTests.cs +++ b/tests/Elastic.OpenTelemetry.EndToEndTests/ServiceTests.cs @@ -45,6 +45,6 @@ public async Task DisposeAsync() if (!success) return; - fixture.AspNetApplication.IterateOverLog(Output.WriteLine); + DotNetRunApplication.IterateOverLog(Output.WriteLine); } }