diff --git a/.github/.github.csproj b/.github/.github.csproj index 568bf7d5..1dd24ff8 100644 --- a/.github/.github.csproj +++ b/.github/.github.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 False diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b61c8b3c..5b2c97ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -119,4 +119,4 @@ jobs: run: dotnet publish examples/ecs-aot-smoketest - name: Invoke AOT - run: ./examples/ecs-aot-smoketest/bin/Release/net9.0/${{ matrix.os.folder }}/publish/${{ matrix.os.binary }} + run: ./examples/ecs-aot-smoketest/bin/Release/net10.0/${{ matrix.os.folder }}/publish/${{ matrix.os.binary }} diff --git a/.gitignore b/.gitignore index f9805e76..44a71599 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,6 @@ build/tools/* !build/tools/sn/* !build/tools/ilmerge !build/*.fsx -!build/*.fsx !build/*.ps1 !build/*.nuspec !build/*.png @@ -79,4 +78,6 @@ project.lock.json src/packages/ BenchmarkDotNet.Artifacts -html_docs \ No newline at end of file +html_docs + +.artifacts \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 5d8d53ea..8c2708b4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,15 +11,20 @@ - canary - 0.1 + canary.0 + 0.2 latest true $(DefineConstants);FULLFRAMEWORK + + true + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.sh)) + $(MSBuildThisFileDirectory).artifacts + - + diff --git a/build/scripts/Paths.fs b/build/scripts/Paths.fs index 1b2ee887..2dc716a0 100644 --- a/build/scripts/Paths.fs +++ b/build/scripts/Paths.fs @@ -15,7 +15,7 @@ let GenerateApiChanges = false let Root = let mutable dir = DirectoryInfo(".") - while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent + while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent Environment.CurrentDirectory <- dir.FullName dir diff --git a/build/scripts/Program.fs b/build/scripts/Program.fs index 51f1e557..f4fd7ee4 100644 --- a/build/scripts/Program.fs +++ b/build/scripts/Program.fs @@ -28,18 +28,7 @@ let main argv = Targets.Setup parsed arguments let swallowTypes = [ typeof; typeof ] - // temp fix for unit reporting: https://github.com/elastic/apm-pipeline-library/issues/2063 - let exitCode = - try - try - Targets.RunTargetsWithoutExiting([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), ":") - 0 - with - | :? InvalidUsageException as ex -> - Console.WriteLine ex.Message - 2 - | :? TargetFailedException as ex -> 1 - finally - Targets.teardown() - - exitCode + task { + return! Targets.RunTargetsAndExitAsync([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), (fun _ -> ":"), null, null) + } |> Async.AwaitTask |> Async.RunSynchronously + 0 diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index 70e56c9b..e9b889b3 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -15,25 +15,22 @@ let runningOnWindows = Fake.Core.Environment.isWindows let execWithTimeout binary args timeout = let opts = - ExecArguments(binary, args |> List.map (sprintf "\"%s\"") |> List.toArray) + ExecArguments(binary, args |> List.toArray, Timeout=timeout) - let r = Proc.Exec(opts, timeout) - - match r.HasValue with - | true -> r.Value - | false -> failwithf "invocation of `%s` timed out" binary + Proc.Exec(opts) let exec binary args = - execWithTimeout binary args (TimeSpan.FromMinutes 10) + execWithTimeout binary args (Nullable(TimeSpan.FromMinutes 10.)) let private restoreTools = lazy (exec "dotnet" [ "tool"; "restore" ]) let private currentVersion = - lazy - (restoreTools.Value |> ignore - let r = Proc.Start("dotnet", "minver", "-d=canary", "-m=0.1") - let o = r.ConsoleOut |> Seq.find (fun l -> not (l.Line.StartsWith("MinVer:"))) - o.Line) + lazy( + restoreTools.Value |> ignore + let r = Proc.Start("dotnet", "minver", "-p", "canary.0", "-m", "0.1") + let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith "MinVer:")) + o.Line + ) let private currentVersionInformational = lazy @@ -68,15 +65,10 @@ let private runTests (arguments: ParseResults) testMode = | Unit -> [ "--filter"; "FullyQualifiedName!~IntegrationTests" ] | Integration -> [ "--filter"; "FullyQualifiedName~IntegrationTests" ] - let os = if runningOnWindows then "win" else "linux" - let junitOutput = - Path.Combine(Paths.Output.FullName, $"junit-%s{os}-%s{mode}-{{assembly}}-{{framework}}-test-results.xml") - - let loggerPathArgs = sprintf "LogFilePath=%s" junitOutput - let loggerArg = $"--logger:\"junit;%s{loggerPathArgs};MethodFormat=Class;FailureBodyFormat=Verbose\"" - let settingsArg = if runningOnCI then (["-s"; ".ci.runsettings"]) else []; + let loggerArg = $"--logger:GithubActions" + let settingsArg = if runningOnCI then ["-s"; ".ci.runsettings"] else []; - execWithTimeout "dotnet" ([ "test" ] @ filterArg @ settingsArg @ [ "-c"; "RELEASE"; "-m:1"; loggerArg ]) (TimeSpan.FromMinutes 15) + execWithTimeout "dotnet" ([ "test" ] @ filterArg @ settingsArg @ [ "-c"; "RELEASE"; "-m:1"; loggerArg ]) (Nullable(TimeSpan.FromMinutes 15.)) |> ignore let private test (arguments: ParseResults) = @@ -120,8 +112,8 @@ let private generateApiChanges (arguments: ParseResults) = let firstPath project tfms = tfms - |> Seq.map (fun tfm -> (tfm, sprintf "directory|src/%s/bin/Release/%s" project Paths.MainTFM)) - |> Seq.where (fun (tfm, path) -> File.Exists path) + |> Seq.map (fun tfm -> (tfm, $".artifacts/bin/%s{project}/release_%s{Paths.MainTFM}")) + |> Seq.where (fun (tfm, path) -> Directory.Exists path) |> Seq.tryHead nugetPackages diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index c5c88252..4fcc377c 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -2,13 +2,13 @@ Exe - net8.0 + net10.0 false - - + + diff --git a/docs/docs.csproj b/docs/docs.csproj index 568bf7d5..1dd24ff8 100644 --- a/docs/docs.csproj +++ b/docs/docs.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 False diff --git a/dotnet-tools.json b/dotnet-tools.json index c20584c7..6a2e0b1b 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,28 +3,28 @@ "isRoot": true, "tools": { "minver-cli": { - "version": "2.3.1", + "version": "6.0.0", "commands": [ "minver" ], "rollForward": false }, "assembly-differ": { - "version": "0.14.0", + "version": "0.17.0", "commands": [ "assembly-differ" ], "rollForward": false }, "release-notes": { - "version": "0.6.0", + "version": "0.10.0", "commands": [ "release-notes" ], "rollForward": false }, "nupkg-validator": { - "version": "0.7.0", + "version": "0.10.1", "commands": [ "nupkg-validator" ], diff --git a/ecs-dotnet.sln b/ecs-dotnet.sln deleted file mode 100644 index 56f1d65f..00000000 --- a/ecs-dotnet.sln +++ /dev/null @@ -1,372 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.3.32819.101 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = ".github", ".github\.github.csproj", "{80D7CE12-D0C9-44E2-9BF9-5762D52ADA05}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema", "src\Elastic.CommonSchema\Elastic.CommonSchema.csproj", "{70072EAB-C5DF-4100-B594-B9DC3169D604}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Serilog", "src\Elastic.CommonSchema.Serilog\Elastic.CommonSchema.Serilog.csproj", "{45BC8315-6AD6-4F3C-B590-7B52D19ED401}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Serilog.Tests", "tests\Elastic.CommonSchema.Serilog.Tests\Elastic.CommonSchema.Serilog.Tests.csproj", "{D7BA6070-909F-402E-A6F4-1CE54A7BE0B7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Specification", "src\Specification\Specification.csproj", "{21FD7B39-5FDD-4432-B25E-8425D3EC46A3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.SerilogEnricher", "src\Elastic.Apm.SerilogEnricher\Elastic.Apm.SerilogEnricher.csproj", "{240A3E16-78BF-4430-A3ED-C7479F12A6DE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.SerilogEnricher.Tests", "tests\Elastic.Apm.SerilogEnricher.Tests\Elastic.Apm.SerilogEnricher.Tests.csproj", "{D8117E06-8856-4D61-A02E-570E9B6C3646}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "scripts", "build\scripts\scripts.fsproj", "{4779DD6F-AE49-4A80-9F67-D9F2DB05E557}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.NLog", "src\Elastic.Apm.NLog\Elastic.Apm.NLog.csproj", "{A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.NLog.Tests", "tests\Elastic.Apm.NLog.Tests\Elastic.Apm.NLog.Tests.csproj", "{4755093F-5A27-4EF4-BC7F-DB8676E9B81A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.Test.Common", "tests\Elastic.Apm.Test.Common\Elastic.Apm.Test.Common.csproj", "{4E0D951B-FEC5-4043-913A-BED795892405}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7610B796-BB3E-4CB2-8296-79BBFF6D23FC}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - src\NullableExtensions.cs = src\NullableExtensions.cs - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3582B07D-C2B0-49CC-B676-EAF806EB010E}" - ProjectSection(SolutionItems) = preProject - tests\.runsettings = tests\.runsettings - tests\Directory.Build.props = tests\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{441B3323-3651-4B6E-95B3-7CD43E5E223A}" - ProjectSection(SolutionItems) = preProject - .ci.runsettings = .ci.runsettings - build.bat = build.bat - build.sh = build.sh - Directory.Build.props = Directory.Build.props - global.json = global.json - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Tests", "tests\Elastic.CommonSchema.Tests\Elastic.CommonSchema.Tests.csproj", "{EE4EA2DE-411D-400C-9BF6-8F6AFC17697C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.BenchmarkDotNetExporter", "src\Elastic.CommonSchema.BenchmarkDotNetExporter\Elastic.CommonSchema.BenchmarkDotNetExporter.csproj", "{6BE3084A-D84D-4782-9915-6E41575712C7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests", "tests-integration\Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests\Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests.csproj", "{4138E98A-4714-4139-BD89-D9FF4F2A3A73}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.NLog", "src\Elastic.CommonSchema.NLog\Elastic.CommonSchema.NLog.csproj", "{0881CC2E-BFBB-40DB-BA5B-B3D23A985F73}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.NLog.Tests", "tests\Elastic.CommonSchema.NLog.Tests\Elastic.CommonSchema.NLog.Tests.csproj", "{89ADA999-1A1D-4B51-8CEE-39A553F669D1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{05075402-8669-45BD-913A-BD40A29BBEAB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspnetCoreExample", "examples\aspnetcore-with-serilog\AspnetCoreExample.csproj", "{03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aspnetcore-with-serilog", "aspnetcore-with-serilog", "{9F103D76-F7FA-4D10-8214-6E79C28D5AEC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Benchmarks", "tools\Elastic.CommonSchema.Benchmarks\Elastic.CommonSchema.Benchmarks.csproj", "{EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging", "src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj", "{D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging.IntegrationTests", "tests-integration\Elastic.Extensions.Logging.IntegrationTests\Elastic.Extensions.Logging.IntegrationTests.csproj", "{0E7008E1-B215-4B9B-BC28-DC9D31415FB9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging.Example", "examples\Elastic.Extensions.Logging.Example\Elastic.Extensions.Logging.Example.csproj", "{F319AD28-A0A4-4012-8480-E2A4CFA755C2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-with-extensions-logging", "examples\console-with-extensions-logging\console-with-extensions-logging.csproj", "{D87AE73E-8112-444C-8F2F-CFBC4F738026}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Generator", "tools\Elastic.CommonSchema.Generator\Elastic.CommonSchema.Generator.csproj", "{D6F0D170-39D7-4868-86EE-990B6B05C14D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Ingest.Elasticsearch.CommonSchema", "src\Elastic.Ingest.Elasticsearch.CommonSchema\Elastic.Ingest.Elasticsearch.CommonSchema.csproj", "{68128AE4-350C-4FB2-A971-C9272A1F3829}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Serilog.Sinks", "src\Elastic.Serilog.Sinks\Elastic.Serilog.Sinks.csproj", "{30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Log4net", "src\Elastic.CommonSchema.Log4net\Elastic.CommonSchema.Log4net.csproj", "{DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Log4net.Tests", "tests\Elastic.CommonSchema.Log4net.Tests\Elastic.CommonSchema.Log4net.Tests.csproj", "{14BFAF67-8DB6-48D0-B57E-84767BA2A239}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Serilog.Sinks.IntegrationTests", "tests-integration\Elastic.Serilog.Sinks.IntegrationTests\Elastic.Serilog.Sinks.IntegrationTests.csproj", "{622CC10E-B475-4649-8411-CABC31E7C252}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.Disabled.Serilog.Tests", "tests\Elastic.Apm.Disabled.Serilog.Tests\Elastic.Apm.Disabled.Serilog.Tests.csproj", "{73829D36-DB98-4D8F-8741-F167A787BF7B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests", "tests-integration\Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests\Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests.csproj", "{1AF36656-7950-42D1-996D-DF5985298926}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_solution", "_solution", "{BAF28E09-EAAE-400D-8E0D-6E7C3000997A}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - .gitattributes = .gitattributes - .gitignore = .gitignore - .pre-commit-config.yaml = .pre-commit-config.yaml - build.bat = build.bat - build.sh = build.sh - contributing.md = contributing.md - Directory.Build.props = Directory.Build.props - dotnet-tools.json = dotnet-tools.json - ecs-dotnet.sln = ecs-dotnet.sln - ecs-dotnet.sln.DotSettings = ecs-dotnet.sln.DotSettings - global.json = global.json - issue_template.md = issue_template.md - license.txt = license.txt - nuget-icon.png = nuget-icon.png - nuget.config = nuget.config - README.md = README.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests-integration", "tests-integration", "{947B298F-9139-4868-B337-729541932E4D}" - ProjectSection(SolutionItems) = preProject - tests-integration\.runsettings = tests-integration\.runsettings - tests-integration\Directory.Build.props = tests-integration\Directory.Build.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.IntegrationDefaults", "tests-integration\Elasticsearch.IntegrationDefaults\Elasticsearch.IntegrationDefaults.csproj", "{AB197BBD-D90D-4ACB-AD09-C59913FA109F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B268060B-83ED-4944-B135-C362DFCBFC0C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Serilog.Sinks.Example", "examples\Elastic.Serilog.Sinks.Example\Elastic.Serilog.Sinks.Example.csproj", "{1CAEFBD7-B800-41C4-81D3-CB6839FA563D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docs", "docs\docs.csproj", "{7FDB3B31-020A-40E3-B564-F06476320C40}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aspnetcore-with-extensions-logging", "examples\aspnetcore-with-extensions-logging\aspnetcore-with-extensions-logging.csproj", "{D866F335-BC19-49A8-AF72-4BA66CC7AFFB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.NLog.Targets", "src\Elastic.NLog.Targets\Elastic.NLog.Targets.csproj", "{692F8035-F3F9-4714-8C9D-D54AF4CEB0E0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.NLog.Targets.IntegrationTests", "tests-integration\Elastic.NLog.Targets.IntegrationTests\Elastic.NLog.Targets.IntegrationTests.csproj", "{D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "playground", "examples\playground\playground.csproj", "{86AEB76A-C210-4250-8541-B349C26C1683}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Extensions.Logging.Console", "src\Elastic.Extensions.Logging.Console\Elastic.Extensions.Logging.Console.csproj", "{E0033468-2448-47F5-8B7A-8DC1F5FF080C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Extensions.Logging.Console.Example", "examples\Elastic.Extensions.Logging.Console.Example\Elastic.Extensions.Logging.Console.Example.csproj", "{9656A08E-9DA6-473A-B3F8-245AC7B81A28}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Extensions.Logging.Common", "src\Elastic.Extensions.Logging.Common\Elastic.Extensions.Logging.Common.csproj", "{5EDF109F-9DFF-4957-8864-BA2702FB78F6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Serilog.Sinks.Tests", "tests\Elastic.Serilog.Sinks.Tests\Elastic.Serilog.Sinks.Tests.csproj", "{933FD923-A2DC-49E3-B21E-8BA888DB5924}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Serilog.Enrichers.Web", "src\Elastic.Serilog.Enrichers.Web\Elastic.Serilog.Enrichers.Web.csproj", "{B6DCC4C4-1287-41BE-A19D-8F311C6E39F7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ecs-aot-smoketest", "examples\ecs-aot-smoketest\ecs-aot-smoketest.csproj", "{46706BAE-BBCD-4DD9-ADBD-AC099C770854}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {80D7CE12-D0C9-44E2-9BF9-5762D52ADA05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {80D7CE12-D0C9-44E2-9BF9-5762D52ADA05}.Debug|Any CPU.Build.0 = Debug|Any CPU - {80D7CE12-D0C9-44E2-9BF9-5762D52ADA05}.Release|Any CPU.ActiveCfg = Release|Any CPU - {80D7CE12-D0C9-44E2-9BF9-5762D52ADA05}.Release|Any CPU.Build.0 = Release|Any CPU - {70072EAB-C5DF-4100-B594-B9DC3169D604}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70072EAB-C5DF-4100-B594-B9DC3169D604}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70072EAB-C5DF-4100-B594-B9DC3169D604}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70072EAB-C5DF-4100-B594-B9DC3169D604}.Release|Any CPU.Build.0 = Release|Any CPU - {45BC8315-6AD6-4F3C-B590-7B52D19ED401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45BC8315-6AD6-4F3C-B590-7B52D19ED401}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45BC8315-6AD6-4F3C-B590-7B52D19ED401}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45BC8315-6AD6-4F3C-B590-7B52D19ED401}.Release|Any CPU.Build.0 = Release|Any CPU - {D7BA6070-909F-402E-A6F4-1CE54A7BE0B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7BA6070-909F-402E-A6F4-1CE54A7BE0B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7BA6070-909F-402E-A6F4-1CE54A7BE0B7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7BA6070-909F-402E-A6F4-1CE54A7BE0B7}.Release|Any CPU.Build.0 = Release|Any CPU - {21FD7B39-5FDD-4432-B25E-8425D3EC46A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21FD7B39-5FDD-4432-B25E-8425D3EC46A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {240A3E16-78BF-4430-A3ED-C7479F12A6DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {240A3E16-78BF-4430-A3ED-C7479F12A6DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {240A3E16-78BF-4430-A3ED-C7479F12A6DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {240A3E16-78BF-4430-A3ED-C7479F12A6DE}.Release|Any CPU.Build.0 = Release|Any CPU - {D8117E06-8856-4D61-A02E-570E9B6C3646}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D8117E06-8856-4D61-A02E-570E9B6C3646}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8117E06-8856-4D61-A02E-570E9B6C3646}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D8117E06-8856-4D61-A02E-570E9B6C3646}.Release|Any CPU.Build.0 = Release|Any CPU - {4779DD6F-AE49-4A80-9F67-D9F2DB05E557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4779DD6F-AE49-4A80-9F67-D9F2DB05E557}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4779DD6F-AE49-4A80-9F67-D9F2DB05E557}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4779DD6F-AE49-4A80-9F67-D9F2DB05E557}.Release|Any CPU.Build.0 = Release|Any CPU - {A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA}.Release|Any CPU.Build.0 = Release|Any CPU - {4755093F-5A27-4EF4-BC7F-DB8676E9B81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4755093F-5A27-4EF4-BC7F-DB8676E9B81A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4755093F-5A27-4EF4-BC7F-DB8676E9B81A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4755093F-5A27-4EF4-BC7F-DB8676E9B81A}.Release|Any CPU.Build.0 = Release|Any CPU - {4E0D951B-FEC5-4043-913A-BED795892405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E0D951B-FEC5-4043-913A-BED795892405}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E0D951B-FEC5-4043-913A-BED795892405}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E0D951B-FEC5-4043-913A-BED795892405}.Release|Any CPU.Build.0 = Release|Any CPU - {EE4EA2DE-411D-400C-9BF6-8F6AFC17697C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE4EA2DE-411D-400C-9BF6-8F6AFC17697C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE4EA2DE-411D-400C-9BF6-8F6AFC17697C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE4EA2DE-411D-400C-9BF6-8F6AFC17697C}.Release|Any CPU.Build.0 = Release|Any CPU - {6BE3084A-D84D-4782-9915-6E41575712C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6BE3084A-D84D-4782-9915-6E41575712C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6BE3084A-D84D-4782-9915-6E41575712C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6BE3084A-D84D-4782-9915-6E41575712C7}.Release|Any CPU.Build.0 = Release|Any CPU - {4138E98A-4714-4139-BD89-D9FF4F2A3A73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4138E98A-4714-4139-BD89-D9FF4F2A3A73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4138E98A-4714-4139-BD89-D9FF4F2A3A73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4138E98A-4714-4139-BD89-D9FF4F2A3A73}.Release|Any CPU.Build.0 = Release|Any CPU - {0881CC2E-BFBB-40DB-BA5B-B3D23A985F73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0881CC2E-BFBB-40DB-BA5B-B3D23A985F73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0881CC2E-BFBB-40DB-BA5B-B3D23A985F73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0881CC2E-BFBB-40DB-BA5B-B3D23A985F73}.Release|Any CPU.Build.0 = Release|Any CPU - {89ADA999-1A1D-4B51-8CEE-39A553F669D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89ADA999-1A1D-4B51-8CEE-39A553F669D1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89ADA999-1A1D-4B51-8CEE-39A553F669D1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89ADA999-1A1D-4B51-8CEE-39A553F669D1}.Release|Any CPU.Build.0 = Release|Any CPU - {03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA}.Release|Any CPU.Build.0 = Release|Any CPU - {EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}.Release|Any CPU.Build.0 = Release|Any CPU - {D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}.Release|Any CPU.Build.0 = Release|Any CPU - {0E7008E1-B215-4B9B-BC28-DC9D31415FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E7008E1-B215-4B9B-BC28-DC9D31415FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E7008E1-B215-4B9B-BC28-DC9D31415FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E7008E1-B215-4B9B-BC28-DC9D31415FB9}.Release|Any CPU.Build.0 = Release|Any CPU - {F319AD28-A0A4-4012-8480-E2A4CFA755C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F319AD28-A0A4-4012-8480-E2A4CFA755C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F319AD28-A0A4-4012-8480-E2A4CFA755C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F319AD28-A0A4-4012-8480-E2A4CFA755C2}.Release|Any CPU.Build.0 = Release|Any CPU - {D87AE73E-8112-444C-8F2F-CFBC4F738026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D87AE73E-8112-444C-8F2F-CFBC4F738026}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D87AE73E-8112-444C-8F2F-CFBC4F738026}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D87AE73E-8112-444C-8F2F-CFBC4F738026}.Release|Any CPU.Build.0 = Release|Any CPU - {D6F0D170-39D7-4868-86EE-990B6B05C14D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D6F0D170-39D7-4868-86EE-990B6B05C14D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D6F0D170-39D7-4868-86EE-990B6B05C14D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D6F0D170-39D7-4868-86EE-990B6B05C14D}.Release|Any CPU.Build.0 = Release|Any CPU - {68128AE4-350C-4FB2-A971-C9272A1F3829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68128AE4-350C-4FB2-A971-C9272A1F3829}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68128AE4-350C-4FB2-A971-C9272A1F3829}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68128AE4-350C-4FB2-A971-C9272A1F3829}.Release|Any CPU.Build.0 = Release|Any CPU - {30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D}.Release|Any CPU.Build.0 = Release|Any CPU - {DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3}.Release|Any CPU.Build.0 = Release|Any CPU - {14BFAF67-8DB6-48D0-B57E-84767BA2A239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {14BFAF67-8DB6-48D0-B57E-84767BA2A239}.Debug|Any CPU.Build.0 = Debug|Any CPU - {14BFAF67-8DB6-48D0-B57E-84767BA2A239}.Release|Any CPU.ActiveCfg = Release|Any CPU - {14BFAF67-8DB6-48D0-B57E-84767BA2A239}.Release|Any CPU.Build.0 = Release|Any CPU - {622CC10E-B475-4649-8411-CABC31E7C252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {622CC10E-B475-4649-8411-CABC31E7C252}.Debug|Any CPU.Build.0 = Debug|Any CPU - {622CC10E-B475-4649-8411-CABC31E7C252}.Release|Any CPU.ActiveCfg = Release|Any CPU - {622CC10E-B475-4649-8411-CABC31E7C252}.Release|Any CPU.Build.0 = Release|Any CPU - {73829D36-DB98-4D8F-8741-F167A787BF7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73829D36-DB98-4D8F-8741-F167A787BF7B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73829D36-DB98-4D8F-8741-F167A787BF7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73829D36-DB98-4D8F-8741-F167A787BF7B}.Release|Any CPU.Build.0 = Release|Any CPU - {1AF36656-7950-42D1-996D-DF5985298926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1AF36656-7950-42D1-996D-DF5985298926}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1AF36656-7950-42D1-996D-DF5985298926}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1AF36656-7950-42D1-996D-DF5985298926}.Release|Any CPU.Build.0 = Release|Any CPU - {AB197BBD-D90D-4ACB-AD09-C59913FA109F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB197BBD-D90D-4ACB-AD09-C59913FA109F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB197BBD-D90D-4ACB-AD09-C59913FA109F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB197BBD-D90D-4ACB-AD09-C59913FA109F}.Release|Any CPU.Build.0 = Release|Any CPU - {1CAEFBD7-B800-41C4-81D3-CB6839FA563D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1CAEFBD7-B800-41C4-81D3-CB6839FA563D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1CAEFBD7-B800-41C4-81D3-CB6839FA563D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1CAEFBD7-B800-41C4-81D3-CB6839FA563D}.Release|Any CPU.Build.0 = Release|Any CPU - {7FDB3B31-020A-40E3-B564-F06476320C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FDB3B31-020A-40E3-B564-F06476320C40}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D866F335-BC19-49A8-AF72-4BA66CC7AFFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D866F335-BC19-49A8-AF72-4BA66CC7AFFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D866F335-BC19-49A8-AF72-4BA66CC7AFFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D866F335-BC19-49A8-AF72-4BA66CC7AFFB}.Release|Any CPU.Build.0 = Release|Any CPU - {692F8035-F3F9-4714-8C9D-D54AF4CEB0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {692F8035-F3F9-4714-8C9D-D54AF4CEB0E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {692F8035-F3F9-4714-8C9D-D54AF4CEB0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {692F8035-F3F9-4714-8C9D-D54AF4CEB0E0}.Release|Any CPU.Build.0 = Release|Any CPU - {D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D}.Release|Any CPU.Build.0 = Release|Any CPU - {86AEB76A-C210-4250-8541-B349C26C1683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {86AEB76A-C210-4250-8541-B349C26C1683}.Debug|Any CPU.Build.0 = Debug|Any CPU - {86AEB76A-C210-4250-8541-B349C26C1683}.Release|Any CPU.ActiveCfg = Release|Any CPU - {86AEB76A-C210-4250-8541-B349C26C1683}.Release|Any CPU.Build.0 = Release|Any CPU - {E0033468-2448-47F5-8B7A-8DC1F5FF080C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E0033468-2448-47F5-8B7A-8DC1F5FF080C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E0033468-2448-47F5-8B7A-8DC1F5FF080C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E0033468-2448-47F5-8B7A-8DC1F5FF080C}.Release|Any CPU.Build.0 = Release|Any CPU - {9656A08E-9DA6-473A-B3F8-245AC7B81A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9656A08E-9DA6-473A-B3F8-245AC7B81A28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9656A08E-9DA6-473A-B3F8-245AC7B81A28}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9656A08E-9DA6-473A-B3F8-245AC7B81A28}.Release|Any CPU.Build.0 = Release|Any CPU - {5EDF109F-9DFF-4957-8864-BA2702FB78F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5EDF109F-9DFF-4957-8864-BA2702FB78F6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5EDF109F-9DFF-4957-8864-BA2702FB78F6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5EDF109F-9DFF-4957-8864-BA2702FB78F6}.Release|Any CPU.Build.0 = Release|Any CPU - {933FD923-A2DC-49E3-B21E-8BA888DB5924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {933FD923-A2DC-49E3-B21E-8BA888DB5924}.Debug|Any CPU.Build.0 = Debug|Any CPU - {933FD923-A2DC-49E3-B21E-8BA888DB5924}.Release|Any CPU.ActiveCfg = Release|Any CPU - {933FD923-A2DC-49E3-B21E-8BA888DB5924}.Release|Any CPU.Build.0 = Release|Any CPU - {B6DCC4C4-1287-41BE-A19D-8F311C6E39F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6DCC4C4-1287-41BE-A19D-8F311C6E39F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6DCC4C4-1287-41BE-A19D-8F311C6E39F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6DCC4C4-1287-41BE-A19D-8F311C6E39F7}.Release|Any CPU.Build.0 = Release|Any CPU - {46706BAE-BBCD-4DD9-ADBD-AC099C770854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46706BAE-BBCD-4DD9-ADBD-AC099C770854}.Debug|Any CPU.Build.0 = Debug|Any CPU - {46706BAE-BBCD-4DD9-ADBD-AC099C770854}.Release|Any CPU.ActiveCfg = Release|Any CPU - {46706BAE-BBCD-4DD9-ADBD-AC099C770854}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {80D7CE12-D0C9-44E2-9BF9-5762D52ADA05} = {441B3323-3651-4B6E-95B3-7CD43E5E223A} - {70072EAB-C5DF-4100-B594-B9DC3169D604} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {45BC8315-6AD6-4F3C-B590-7B52D19ED401} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {D7BA6070-909F-402E-A6F4-1CE54A7BE0B7} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {21FD7B39-5FDD-4432-B25E-8425D3EC46A3} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {240A3E16-78BF-4430-A3ED-C7479F12A6DE} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {D8117E06-8856-4D61-A02E-570E9B6C3646} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {4779DD6F-AE49-4A80-9F67-D9F2DB05E557} = {441B3323-3651-4B6E-95B3-7CD43E5E223A} - {A1DEDE4E-0876-41E8-8DF0-8F85EAF3FAFA} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {4755093F-5A27-4EF4-BC7F-DB8676E9B81A} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {4E0D951B-FEC5-4043-913A-BED795892405} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {EE4EA2DE-411D-400C-9BF6-8F6AFC17697C} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {6BE3084A-D84D-4782-9915-6E41575712C7} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {4138E98A-4714-4139-BD89-D9FF4F2A3A73} = {947B298F-9139-4868-B337-729541932E4D} - {0881CC2E-BFBB-40DB-BA5B-B3D23A985F73} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {89ADA999-1A1D-4B51-8CEE-39A553F669D1} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {03FD4BFA-F9A5-4C16-ACA1-30FD060DFAEA} = {9F103D76-F7FA-4D10-8214-6E79C28D5AEC} - {9F103D76-F7FA-4D10-8214-6E79C28D5AEC} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD} = {B268060B-83ED-4944-B135-C362DFCBFC0C} - {D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {0E7008E1-B215-4B9B-BC28-DC9D31415FB9} = {947B298F-9139-4868-B337-729541932E4D} - {F319AD28-A0A4-4012-8480-E2A4CFA755C2} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {D87AE73E-8112-444C-8F2F-CFBC4F738026} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {D6F0D170-39D7-4868-86EE-990B6B05C14D} = {B268060B-83ED-4944-B135-C362DFCBFC0C} - {68128AE4-350C-4FB2-A971-C9272A1F3829} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {30080079-D3EE-4BDC-9BE9-9D1B3B2BEF8D} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {DD7D6E56-58DB-4E13-9DFC-AE031F1C31B3} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {14BFAF67-8DB6-48D0-B57E-84767BA2A239} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {622CC10E-B475-4649-8411-CABC31E7C252} = {947B298F-9139-4868-B337-729541932E4D} - {73829D36-DB98-4D8F-8741-F167A787BF7B} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {1AF36656-7950-42D1-996D-DF5985298926} = {947B298F-9139-4868-B337-729541932E4D} - {AB197BBD-D90D-4ACB-AD09-C59913FA109F} = {947B298F-9139-4868-B337-729541932E4D} - {1CAEFBD7-B800-41C4-81D3-CB6839FA563D} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {D866F335-BC19-49A8-AF72-4BA66CC7AFFB} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {692F8035-F3F9-4714-8C9D-D54AF4CEB0E0} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {D1C3CAFB-A59D-4E3F-ADD1-4CB281E5349D} = {947B298F-9139-4868-B337-729541932E4D} - {86AEB76A-C210-4250-8541-B349C26C1683} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {E0033468-2448-47F5-8B7A-8DC1F5FF080C} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {9656A08E-9DA6-473A-B3F8-245AC7B81A28} = {05075402-8669-45BD-913A-BD40A29BBEAB} - {5EDF109F-9DFF-4957-8864-BA2702FB78F6} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {933FD923-A2DC-49E3-B21E-8BA888DB5924} = {3582B07D-C2B0-49CC-B676-EAF806EB010E} - {B6DCC4C4-1287-41BE-A19D-8F311C6E39F7} = {7610B796-BB3E-4CB2-8296-79BBFF6D23FC} - {46706BAE-BBCD-4DD9-ADBD-AC099C770854} = {05075402-8669-45BD-913A-BD40A29BBEAB} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7F60C4BB-6216-4E50-B1E4-9C38EB484843} - EndGlobalSection -EndGlobal diff --git a/ecs-dotnet.slnx b/ecs-dotnet.slnx new file mode 100644 index 00000000..dc989152 --- /dev/null +++ b/ecs-dotnet.slnx @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Elastic.Extensions.Logging.Console.Example/Elastic.Extensions.Logging.Console.Example.csproj b/examples/Elastic.Extensions.Logging.Console.Example/Elastic.Extensions.Logging.Console.Example.csproj index 4d730f65..c5177ad7 100644 --- a/examples/Elastic.Extensions.Logging.Console.Example/Elastic.Extensions.Logging.Console.Example.csproj +++ b/examples/Elastic.Extensions.Logging.Console.Example/Elastic.Extensions.Logging.Console.Example.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable @@ -11,6 +11,6 @@ - + diff --git a/examples/Elastic.Extensions.Logging.Example/Elastic.Extensions.Logging.Example.csproj b/examples/Elastic.Extensions.Logging.Example/Elastic.Extensions.Logging.Example.csproj index 9fcc58ca..3527dff7 100644 --- a/examples/Elastic.Extensions.Logging.Example/Elastic.Extensions.Logging.Example.csproj +++ b/examples/Elastic.Extensions.Logging.Example/Elastic.Extensions.Logging.Example.csproj @@ -2,14 +2,14 @@ Exe - net8.0 + net10.0 latest enable - - + + diff --git a/examples/Elastic.Serilog.Sinks.Example/Elastic.Serilog.Sinks.Example.csproj b/examples/Elastic.Serilog.Sinks.Example/Elastic.Serilog.Sinks.Example.csproj index 3ac672e2..2e1d4fb2 100644 --- a/examples/Elastic.Serilog.Sinks.Example/Elastic.Serilog.Sinks.Example.csproj +++ b/examples/Elastic.Serilog.Sinks.Example/Elastic.Serilog.Sinks.Example.csproj @@ -2,19 +2,19 @@ Exe - net8.0 + net10.0 enable enable - + - - - - - + + + + + diff --git a/examples/aspnetcore-with-extensions-logging/aspnetcore-with-extensions-logging.csproj b/examples/aspnetcore-with-extensions-logging/aspnetcore-with-extensions-logging.csproj index df1ab4df..2fd93f0a 100644 --- a/examples/aspnetcore-with-extensions-logging/aspnetcore-with-extensions-logging.csproj +++ b/examples/aspnetcore-with-extensions-logging/aspnetcore-with-extensions-logging.csproj @@ -1,15 +1,15 @@ - net8.0 + net10.0 enable enable aspnetcore_with_extensions_logging - - + + diff --git a/examples/aspnetcore-with-serilog/AspnetCoreExample.csproj b/examples/aspnetcore-with-serilog/AspnetCoreExample.csproj index 9a89478b..784a9684 100644 --- a/examples/aspnetcore-with-serilog/AspnetCoreExample.csproj +++ b/examples/aspnetcore-with-serilog/AspnetCoreExample.csproj @@ -1,17 +1,16 @@  - net8.0 + net10.0 false false - - + + - - - - + + + diff --git a/examples/aspnetcore-with-serilog/Program.cs b/examples/aspnetcore-with-serilog/Program.cs index 23e2d484..32353029 100644 --- a/examples/aspnetcore-with-serilog/Program.cs +++ b/examples/aspnetcore-with-serilog/Program.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; using Serilog; namespace AspnetCoreExample @@ -19,13 +20,18 @@ public class Program .AddEnvironmentVariables() .Build(); - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup() + public static IHost BuildWebHost(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHost(webBuilder => + { + webBuilder + .UseStartup() + .UseKestrel(); + }) .UseSerilog((ctx, config) => { // Ensure HttpContextAccessor is accessible - var httpAccessor = ctx.Configuration.Get(); + var httpAccessor = ctx.Configuration.Get(); config .ReadFrom.Configuration(ctx.Configuration) @@ -35,7 +41,6 @@ public static IWebHost BuildWebHost(string[] args) => //config.WriteTo.Console(formatter); config.WriteTo.Async(a => a.Console(new EcsTextFormatter())); }) - .UseKestrel() .Build(); public static void Main(string[] args) diff --git a/examples/aspnetcore-with-serilog/Startup.cs b/examples/aspnetcore-with-serilog/Startup.cs index 45ccefa4..7711e873 100644 --- a/examples/aspnetcore-with-serilog/Startup.cs +++ b/examples/aspnetcore-with-serilog/Startup.cs @@ -18,6 +18,7 @@ public void ConfigureServices(IServiceCollection services) { // Ensure that we make the HttpContextAccessor resolvable through the configuration services.AddHttpContextAccessor(); + services.AddElasticApm(); services.AddControllers(); } @@ -29,7 +30,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseDeveloperExceptionPage(); app.UseRouting(); - app.UseElasticApm(); app.UseAuthorization(); diff --git a/examples/console-with-extensions-logging/console-with-extensions-logging.csproj b/examples/console-with-extensions-logging/console-with-extensions-logging.csproj index b0e4e524..be9f2997 100644 --- a/examples/console-with-extensions-logging/console-with-extensions-logging.csproj +++ b/examples/console-with-extensions-logging/console-with-extensions-logging.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 latest enable @@ -14,7 +14,7 @@ - + diff --git a/examples/ecs-aot-smoketest/ecs-aot-smoketest.csproj b/examples/ecs-aot-smoketest/ecs-aot-smoketest.csproj index f9cb9493..3fc90803 100644 --- a/examples/ecs-aot-smoketest/ecs-aot-smoketest.csproj +++ b/examples/ecs-aot-smoketest/ecs-aot-smoketest.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 ecs_aot_smoketest enable enable diff --git a/examples/playground/playground.csproj b/examples/playground/playground.csproj index 517933d1..8700e1b6 100644 --- a/examples/playground/playground.csproj +++ b/examples/playground/playground.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable @@ -12,7 +12,7 @@ - + diff --git a/global.json b/global.json index 41c9ad2e..d46d21e5 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "10.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 56b95fa7..799c9f08 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -44,7 +44,7 @@ - - + + diff --git a/src/Elastic.Apm.NLog/Elastic.Apm.NLog.csproj b/src/Elastic.Apm.NLog/Elastic.Apm.NLog.csproj index 875cdb2a..46dbacc3 100644 --- a/src/Elastic.Apm.NLog/Elastic.Apm.NLog.csproj +++ b/src/Elastic.Apm.NLog/Elastic.Apm.NLog.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net462;net8.0 + netstandard2.0;net462;net8.0;net10.0 Elastic APM NLog Layout Renderers Enrich NLog log messages with APM TraceId and TransactionId. True @@ -14,6 +14,6 @@ a lower NLog version --> - + diff --git a/src/Elastic.Apm.SerilogEnricher/Elastic.Apm.SerilogEnricher.csproj b/src/Elastic.Apm.SerilogEnricher/Elastic.Apm.SerilogEnricher.csproj index 2f8b2074..502392de 100644 --- a/src/Elastic.Apm.SerilogEnricher/Elastic.Apm.SerilogEnricher.csproj +++ b/src/Elastic.Apm.SerilogEnricher/Elastic.Apm.SerilogEnricher.csproj @@ -1,12 +1,12 @@ - netstandard2.0;net462;net8.0 + netstandard2.0;net462;net8.0;net10.0 Elastic APM Serilog Enricher Enrich Serilog log messages with APM TraceId and TransactionId. True - + diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkConfidence.cs b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkConfidence.cs index ca1a85be..74a384d7 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkConfidence.cs +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkConfidence.cs @@ -16,12 +16,9 @@ public BenchmarkConfidence() {} /// public BenchmarkConfidence(ConfidenceInterval interval) { - Level = interval.Level; + Level = interval.ConfidenceLevel.Value; Lower = interval.Lower; Margin = interval.Margin; - Mean = interval.Mean; - N = interval.N; - StandardError = interval.StandardError; } /// @@ -36,16 +33,5 @@ public BenchmarkConfidence(ConfidenceInterval interval) [JsonPropertyName("margin"), DataMember(Name = "margin")] public double Margin { get; set; } - /// - [JsonPropertyName("mean"), DataMember(Name = "mean")] - public double Mean { get; set; } - - /// - [JsonPropertyName("n"), DataMember(Name = "n")] - public int N { get; set; } - - /// - [JsonPropertyName("standard_error"), DataMember(Name = "standard_error")] - public double StandardError { get; set; } } } diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkData.cs b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkData.cs index d22349ba..eb52a44a 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkData.cs +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkData.cs @@ -39,7 +39,6 @@ public BenchmarkData(Statistics statistics, bool success) StandardDeviation = statistics.StandardDeviation; Skewness = statistics.Skewness; Kurtosis = statistics.Kurtosis; - ConfidenceInterval = new BenchmarkConfidence(statistics.ConfidenceInterval); Percentiles = new Percentiles(statistics.Percentiles); } diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkGcStats.cs b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkGcStats.cs index 8c1d5d65..bfaf5aec 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkGcStats.cs +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkGcStats.cs @@ -26,7 +26,7 @@ public BenchmarkGcStats(GcStats statistics, BenchmarkCase benchmarkCase) /// [JsonPropertyName("bytes_allocated_per_operation"), DataMember(Name = "bytes_allocated_per_operation")] - public long BytesAllocatedPerOperation { get; set; } + public long? BytesAllocatedPerOperation { get; set; } /// [JsonPropertyName("total_operations"), DataMember(Name = "total_operations")] diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkLaunchInformation.cs b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkLaunchInformation.cs index ffbb3180..55262389 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkLaunchInformation.cs +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Domain/BenchmarkLaunchInformation.cs @@ -32,7 +32,7 @@ public class BenchmarkLaunchInformation /// [JsonPropertyName("invocation_count"), DataMember(Name = "invocation_count")] - public int InvocationCount { get; set; } + public long InvocationCount { get; set; } /// [JsonPropertyName("max_iteration_count"), DataMember(Name = "max_iteration_count")] diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Elastic.CommonSchema.BenchmarkDotNetExporter.csproj b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Elastic.CommonSchema.BenchmarkDotNetExporter.csproj index 2a4727de..894fed37 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Elastic.CommonSchema.BenchmarkDotNetExporter.csproj +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/Elastic.CommonSchema.BenchmarkDotNetExporter.csproj @@ -11,6 +11,6 @@ - + diff --git a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/ElasticsearchBenchmarkExporter.cs b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/ElasticsearchBenchmarkExporter.cs index df360a8b..8718d3b9 100644 --- a/src/Elastic.CommonSchema.BenchmarkDotNetExporter/ElasticsearchBenchmarkExporter.cs +++ b/src/Elastic.CommonSchema.BenchmarkDotNetExporter/ElasticsearchBenchmarkExporter.cs @@ -238,10 +238,10 @@ private static BenchmarkHost CreateHostEnvironmentInformation(Summary summary) { var environmentInfo = new BenchmarkHost { - ProcessorName = summary.HostEnvironmentInfo.CpuInfo.Value.ProcessorName, - PhysicalProcessorCount = summary.HostEnvironmentInfo.CpuInfo.Value?.PhysicalProcessorCount, - PhysicalCoreCount = summary.HostEnvironmentInfo.CpuInfo.Value?.PhysicalCoreCount, - LogicalCoreCount = summary.HostEnvironmentInfo.CpuInfo.Value?.LogicalCoreCount, + ProcessorName = summary.HostEnvironmentInfo.Cpu.Value.ProcessorName, + PhysicalProcessorCount = summary.HostEnvironmentInfo.Cpu.Value.PhysicalProcessorCount, + PhysicalCoreCount = summary.HostEnvironmentInfo.Cpu.Value.PhysicalCoreCount, + LogicalCoreCount = summary.HostEnvironmentInfo.Cpu.Value.LogicalCoreCount, Architecture = summary.HostEnvironmentInfo.Architecture, VirtualMachineHypervisor = summary.HostEnvironmentInfo.VirtualMachineHypervisor.Value?.Name, InDocker = summary.HostEnvironmentInfo.InDocker, @@ -250,7 +250,7 @@ private static BenchmarkHost CreateHostEnvironmentInformation(Summary summary) HardwareTimerKind = summary.HostEnvironmentInfo.HardwareTimerKind.ToString(), Os = new Os { - Version = summary.HostEnvironmentInfo.OsVersion.Value, + Version = summary.HostEnvironmentInfo.Os.Value.Version, Name = OsName(), Platform = OsPlatform() } diff --git a/src/Elastic.CommonSchema.Log4net/Elastic.CommonSchema.Log4net.csproj b/src/Elastic.CommonSchema.Log4net/Elastic.CommonSchema.Log4net.csproj index fe10dd08..483aae60 100644 --- a/src/Elastic.CommonSchema.Log4net/Elastic.CommonSchema.Log4net.csproj +++ b/src/Elastic.CommonSchema.Log4net/Elastic.CommonSchema.Log4net.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net462;net8.0 + netstandard2.0;netstandard2.1;net462;net8.0;net10.0 Elastic Common Schema (ECS) log4net Layout log4net Layout that formats log events in accordance with Elastic Common Schema (ECS). True diff --git a/src/Elastic.CommonSchema.NLog/EcsLayout.cs b/src/Elastic.CommonSchema.NLog/EcsLayout.cs index 4713368f..c7583220 100644 --- a/src/Elastic.CommonSchema.NLog/EcsLayout.cs +++ b/src/Elastic.CommonSchema.NLog/EcsLayout.cs @@ -5,10 +5,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.Serialization; +using System.Diagnostics.CodeAnalysis; using System.Text; -using System.Text.Json.Serialization; -using Elastic.CommonSchema.Serialization; using NLog; using NLog.Config; using NLog.Layouts; @@ -812,66 +810,6 @@ private static void Populate(IDictionary propertyBag, string key private static string ResolveSpanId() => Activity.Current?.GetSpanId(); - /// - /// A subclass of that adds additional properties related to Extensions logging. - /// For instance it adds scope information to each logged event - /// - [JsonConverter(typeof(EcsDocumentJsonConverterFactory))] - public class NLogEcsDocument : EcsDocument - { - // Custom fields; use capitalisation as per ECS - private const string MessageTemplatePropertyName = nameof(MessageTemplate); - - /// - /// Custom field with the original template used to generate the message, with token placeholders - /// for inserted label values, e.g. "Unexpected error processing customer {CustomerId}." - /// - [JsonPropertyName(MessageTemplatePropertyName), DataMember(Name = MessageTemplatePropertyName)] - public string MessageTemplate { get; set; } - - /// - /// If returns true this will be called with the deserialized - /// - /// The additional property encountered - /// - /// The deserialized boxed value you will have to manually unbox to the type that - /// set - /// - /// - protected override bool ReceiveProperty(string propertyName, object value) => - propertyName switch - { - MessageTemplatePropertyName => null != (MessageTemplate = value as string), - _ => false - }; - - /// - /// If implemented in a subclass, this allows you to hook into - /// and make it aware of properties on a subclass of . - /// If is known, set to the correct type and return true. - /// - /// The additional property that encountered - /// Set this to the type you wish to deserialize to - /// Return true if is handled - protected override bool TryRead(string propertyName, out Type type) - { - type = propertyName switch - { - MessageTemplatePropertyName => typeof(string), - _ => null - }; - return type != null; - } - /// - /// Write any additional properties in your subclass during serialization. - /// - /// An action taking a property name and boxed value to write to the output - protected override void WriteAdditionalProperties(Action write) - { - if (MessageTemplate != null) - write(MessageTemplatePropertyName, MessageTemplate); - } - } } } diff --git a/src/Elastic.CommonSchema.NLog/Elastic.CommonSchema.NLog.csproj b/src/Elastic.CommonSchema.NLog/Elastic.CommonSchema.NLog.csproj index a37d3eb5..5adba013 100644 --- a/src/Elastic.CommonSchema.NLog/Elastic.CommonSchema.NLog.csproj +++ b/src/Elastic.CommonSchema.NLog/Elastic.CommonSchema.NLog.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net462;net8.0 + netstandard2.0;netstandard2.1;net462;net8.0;net10.0 Elastic Common Schema (ECS) NLog Layout NLog Layout that formats log events in accordance with Elastic Common Schema (ECS). True diff --git a/src/Elastic.CommonSchema.NLog/NLogEcsDocument.cs b/src/Elastic.CommonSchema.NLog/NLogEcsDocument.cs new file mode 100644 index 00000000..52379399 --- /dev/null +++ b/src/Elastic.CommonSchema.NLog/NLogEcsDocument.cs @@ -0,0 +1,67 @@ +using System; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; +using Elastic.CommonSchema.Serialization; + +namespace Elastic.CommonSchema.NLog; + +/// +/// A subclass of that adds additional properties related to Extensions logging. +/// For instance, it adds scope information to each logged event +/// +public class NLogEcsDocument : EcsDocument +{ + // Custom fields; use capitalisation as per ECS + private const string MessageTemplatePropertyName = nameof(MessageTemplate); + + /// + /// Custom field with the original template used to generate the message, with token placeholders + /// for inserted label values, e.g. "Unexpected error processing customer {CustomerId}." + /// + [JsonPropertyName(MessageTemplatePropertyName), DataMember(Name = MessageTemplatePropertyName)] + public string MessageTemplate { get; set; } + + /// + /// If returns true this will be called with the deserialized + /// + /// The additional property encountered + /// + /// The deserialized boxed value you will have to manually unbox to the type that + /// set + /// + /// + protected override bool ReceiveProperty(string propertyName, object value) => + propertyName switch + { + MessageTemplatePropertyName => null != (MessageTemplate = value as string), + _ => false + }; + + /// + /// If implemented in a subclass, this allows you to hook into + /// and make it aware of properties on a subclass of . + /// If is known, set to the correct type and return true. + /// + /// The additional property that encountered + /// Set this to the type you wish to deserialize to + /// Return true if is handled + protected override bool TryRead(string propertyName, out Type type) + { + type = propertyName switch + { + MessageTemplatePropertyName => typeof(string), + _ => null + }; + return type != null; + } + + /// + /// Write any additional properties in your subclass during serialization. + /// + /// An action taking a property name and boxed value to write to the output + protected override void WriteAdditionalProperties(Action write) + { + if (MessageTemplate != null) + write(MessageTemplatePropertyName, MessageTemplate); + } +} diff --git a/src/Elastic.CommonSchema.NLog/NLogEcsJsonContext.cs b/src/Elastic.CommonSchema.NLog/NLogEcsJsonContext.cs index d94783ad..356e87a3 100644 --- a/src/Elastic.CommonSchema.NLog/NLogEcsJsonContext.cs +++ b/src/Elastic.CommonSchema.NLog/NLogEcsJsonContext.cs @@ -5,6 +5,6 @@ namespace Elastic.CommonSchema.NLog; /// /// /// -[JsonSerializable(typeof(EcsLayout.NLogEcsDocument))] +[JsonSerializable(typeof(NLogEcsDocument))] [JsonSourceGenerationOptions(DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] -public partial class NLogEcsJsonContext : JsonSerializerContext { } +public partial class NLogEcsJsonContext : JsonSerializerContext; diff --git a/src/Elastic.CommonSchema.Serilog/Elastic.CommonSchema.Serilog.csproj b/src/Elastic.CommonSchema.Serilog/Elastic.CommonSchema.Serilog.csproj index bf594823..fc27fce6 100644 --- a/src/Elastic.CommonSchema.Serilog/Elastic.CommonSchema.Serilog.csproj +++ b/src/Elastic.CommonSchema.Serilog/Elastic.CommonSchema.Serilog.csproj @@ -2,7 +2,7 @@ - netstandard2.0;netstandard2.1;net462;net8.0 + netstandard2.0;netstandard2.1;net462;net8.0;net10.0 Elastic Common Schema (ECS) Serilog Formatter Serilog TextFormatter that formats log events in accordance with Elastic Common Schema (ECS). True diff --git a/src/Elastic.CommonSchema.Serilog/LogEventConverter.cs b/src/Elastic.CommonSchema.Serilog/LogEventConverter.cs index c6996c1b..5b91b4f3 100644 --- a/src/Elastic.CommonSchema.Serilog/LogEventConverter.cs +++ b/src/Elastic.CommonSchema.Serilog/LogEventConverter.cs @@ -7,7 +7,6 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Json.Serialization; -using Elastic.CommonSchema.Serialization; using Serilog.Events; using static Elastic.CommonSchema.Serilog.SpecialProperties; @@ -15,7 +14,6 @@ namespace Elastic.CommonSchema.Serilog { /// A specialized instance of that holds on to the original /// This property won't be emitted to JSON but is used to report back to serilog failure pipelines - [JsonConverter(typeof(EcsDocumentJsonConverterFactory))] public class LogEventEcsDocument : EcsDocument { /// The original for bookkeeping, not send over to Elasticsearch diff --git a/src/Elastic.CommonSchema/Elastic.CommonSchema.csproj b/src/Elastic.CommonSchema/Elastic.CommonSchema.csproj index 2baaf315..7e0304c2 100644 --- a/src/Elastic.CommonSchema/Elastic.CommonSchema.csproj +++ b/src/Elastic.CommonSchema/Elastic.CommonSchema.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net462;net8.0;net9.0 + netstandard2.0;netstandard2.1;net462;net8.0;net10.0 Elastic Common Schema (ECS) Types Maps Elastic Common Schema (ECS) to .NET types including (de)serialization using System.Text.Json latest @@ -14,7 +14,7 @@ - + diff --git a/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverter.cs b/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverter.cs index 46570ca1..8d60bac3 100644 --- a/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverter.cs +++ b/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverter.cs @@ -6,101 +6,100 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.CommonSchema.Serialization +namespace Elastic.CommonSchema.Serialization; + +/// A JsonConverter for that supports the +/// https://github.com/elastic/ecs-logging specification +/// +public partial class EcsDocumentJsonConverter where TBase : EcsDocument, new() { - /// A JsonConverter for that supports the - /// https://github.com/elastic/ecs-logging specification - /// - public partial class EcsDocumentJsonConverter where TBase : EcsDocument, new() + /// + public override TBase? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - /// - public override TBase? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + if (reader.TokenType == JsonTokenType.Null) { - if (reader.TokenType == JsonTokenType.Null) - { - reader.Read(); - return null; - } - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException(); - - var ecsEvent = new TBase(); - - string? loglevel = null; - string? ecsVersion = null; - DateTimeOffset? timestamp = default; - var originalDepth = reader.CurrentDepth; - while (reader.Read()) - { - if (reader.TokenType == JsonTokenType.EndObject) - { - if (reader.CurrentDepth <= originalDepth) - break; - continue; - } + reader.Read(); + return null; + } + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException(); + var ecsEvent = new TBase(); - var _ = ReadProperties(ref reader, ecsEvent, ref timestamp, ref loglevel, ref ecsVersion, options); - } - if (!string.IsNullOrEmpty(loglevel)) - { - ecsEvent.Log ??= new Log(); - ecsEvent.Log.Level = loglevel; - } - if (!string.IsNullOrEmpty(ecsVersion)) + string? loglevel = null; + string? ecsVersion = null; + DateTimeOffset? timestamp = default; + var originalDepth = reader.CurrentDepth; + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) { - ecsEvent.Ecs ??= new Ecs(); - ecsEvent.Ecs.Version = ecsVersion; + if (reader.CurrentDepth <= originalDepth) + break; + continue; } - ecsEvent.Timestamp = timestamp; - return ecsEvent; - } + if (reader.TokenType != JsonTokenType.PropertyName) + throw new JsonException(); - private static void WriteMessage(Utf8JsonWriter writer, EcsDocument value) - { - if (!string.IsNullOrEmpty(value.Message)) - writer.WriteString("message", value.Message); + var _ = ReadProperties(ref reader, ecsEvent, ref timestamp, ref loglevel, ref ecsVersion, options); } - - private static void WriteLogEntity(Utf8JsonWriter writer, Log? value, JsonSerializerOptions options) { - if (value == null) return; - if (!value.ShouldSerialize) return; - - WriteProp(writer, "log", value, EcsJsonContext.Default.Log, options); + if (!string.IsNullOrEmpty(loglevel)) + { + ecsEvent.Log ??= new Log(); + ecsEvent.Log.Level = loglevel; } - - private static void WriteLogLevel(Utf8JsonWriter writer, EcsDocument value) + if (!string.IsNullOrEmpty(ecsVersion)) { - if (!string.IsNullOrEmpty(value.Log?.Level)) - writer.WriteString("log.level", value.Log?.Level); + ecsEvent.Ecs ??= new Ecs(); + ecsEvent.Ecs.Version = ecsVersion; } + ecsEvent.Timestamp = timestamp; - private static void WriteEcsEntity(Utf8JsonWriter writer, Ecs? value, JsonSerializerOptions options) - { - if (value == null) return; - if (!value.ShouldSerialize) return; + return ecsEvent; + } - WriteProp(writer, "ecs", value, EcsJsonContext.Default.Ecs, options); - } + private static void WriteMessage(Utf8JsonWriter writer, EcsDocument value) + { + if (!string.IsNullOrEmpty(value.Message)) + writer.WriteString("message", value.Message); + } - private static void WriteEcsVersion(Utf8JsonWriter writer, EcsDocument value) => - writer.WriteString("ecs.version", value.Ecs?.Version ?? EcsDocument.Version); + private static void WriteLogEntity(Utf8JsonWriter writer, Log? value, JsonSerializerOptions options) { + if (value == null) return; + if (!value.ShouldSerialize) return; - private static void WriteTimestamp(Utf8JsonWriter writer, BaseFieldSet value, JsonSerializerOptions options) - { - if (!value.Timestamp.HasValue) return; + WriteProp(writer, "log", value, EcsJsonContext.Default.Log, options); + } - writer.WritePropertyName("@timestamp"); - var converter = GetDateTimeOffsetConverter(options); - converter.Write(writer, value.Timestamp.Value, options); - } + private static void WriteLogLevel(Utf8JsonWriter writer, EcsDocument value) + { + if (!string.IsNullOrEmpty(value.Log?.Level)) + writer.WriteString("log.level", value.Log?.Level); } - /// A JsonConverter for that supports the - /// https://github.com/elastic/ecs-logging specification - /// - public class EcsDocumentJsonConverter : EcsDocumentJsonConverter; + private static void WriteEcsEntity(Utf8JsonWriter writer, Ecs? value, JsonSerializerOptions options) + { + if (value == null) return; + if (!value.ShouldSerialize) return; + + WriteProp(writer, "ecs", value, EcsJsonContext.Default.Ecs, options); + } + + private static void WriteEcsVersion(Utf8JsonWriter writer, EcsDocument value) => + writer.WriteString("ecs.version", value.Ecs?.Version ?? EcsDocument.Version); + + private static void WriteTimestamp(Utf8JsonWriter writer, BaseFieldSet value, JsonSerializerOptions options) + { + if (!value.Timestamp.HasValue) return; + + writer.WritePropertyName("@timestamp"); + var converter = GetDateTimeOffsetConverter(options); + converter.Write(writer, value.Timestamp.Value, options); + } } + +/// A JsonConverter for that supports the +/// https://github.com/elastic/ecs-logging specification +/// +public class EcsDocumentJsonConverter : EcsDocumentJsonConverter; diff --git a/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverterFactory.cs b/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverterFactory.cs index ee1e24c3..9e5777b8 100644 --- a/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverterFactory.cs +++ b/src/Elastic.CommonSchema/Serialization/EcsDocumentJsonConverterFactory.cs @@ -1,31 +1,48 @@ using System; using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.CommonSchema.Serialization +namespace Elastic.CommonSchema.Serialization; + +/// +/// Ensures any subclass of uses a json converter that adheres to the +/// https://github.com/elastic/ecs-logging specification +/// +public class EcsDocumentJsonConverterFactory : JsonConverterFactory { - /// - /// Ensures any subclass of uses a json converter that adheres to the - /// https://github.com/elastic/ecs-logging specification - /// - public class EcsDocumentJsonConverterFactory : JsonConverterFactory + /// + public override bool CanConvert(Type typeToConvert) => typeof(EcsDocument).IsAssignableFrom(typeToConvert); + + /// + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "We always provide a static JsonTypeInfoResolver")] + [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "We always provide a static JsonTypeInfoResolver")] + [UnconditionalSuppressMessage("AotAnalysis", "IL2092:DynamicallyAccessedMemberTypes", Justification = "More concrete then override")] + public override JsonConverter CreateConverter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]Type typeToConvert, JsonSerializerOptions options) { - /// - public override bool CanConvert(Type typeToConvert) => typeof(EcsDocument).IsAssignableFrom(typeToConvert); + if (typeToConvert == typeof(EcsDocument)) + return EcsJsonConfiguration.DefaultEcsDocumentJsonConverter; + + var instance = Activator.CreateInstance(typeof(EcsDocumentJsonConverter<>).MakeGenericType(typeToConvert)); + return (JsonConverter)instance!; + } +} + +/// +/// Ensures any subclass of uses a json converter that adheres to the +/// https://github.com/elastic/ecs-logging specification +/// +public class EcsDocumentJsonConverterFactory : JsonConverterFactory where T : EcsDocument, new() +{ + /// + public override bool CanConvert(Type typeToConvert) => typeof(T) == typeToConvert; - /// - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "We always provide a static JsonTypeInfoResolver")] - [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "We always provide a static JsonTypeInfoResolver")] - [UnconditionalSuppressMessage("AotAnalysis", "IL2092:DynamicallyAccessedMemberTypes", Justification = "More concrete then override")] - public override JsonConverter CreateConverter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]Type typeToConvert, JsonSerializerOptions options) - { - if (typeToConvert == typeof(EcsDocument)) - return EcsJsonConfiguration.DefaultEcsDocumentJsonConverter; + /// + public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) + { + if (typeToConvert == typeof(EcsDocument)) + return EcsJsonConfiguration.DefaultEcsDocumentJsonConverter; - var instance = Activator.CreateInstance(typeof(EcsDocumentJsonConverter<>).MakeGenericType(typeToConvert)); - return (JsonConverter)instance!; - } + return new EcsDocumentJsonConverter(); } } diff --git a/src/Elastic.CommonSchema/Serialization/MetadataDictionaryConverter.cs b/src/Elastic.CommonSchema/Serialization/MetadataDictionaryConverter.cs index 1ea88021..82dd7920 100644 --- a/src/Elastic.CommonSchema/Serialization/MetadataDictionaryConverter.cs +++ b/src/Elastic.CommonSchema/Serialization/MetadataDictionaryConverter.cs @@ -9,120 +9,122 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.CommonSchema.Serialization +namespace Elastic.CommonSchema.Serialization; + +/// Deserialize a dictionary of metadata +public class MetadataDictionaryConverter : JsonConverter { - internal class MetadataDictionaryConverter : JsonConverter + internal class MetaDataSerializationFailure { - internal class MetaDataSerializationFailure - { - [JsonPropertyName("reason"), DataMember(Name = "reason")] - public string? SerializationFailure { get; set; } + [JsonPropertyName("reason"), DataMember(Name = "reason")] + public string? SerializationFailure { get; set; } - [JsonPropertyName("key"), DataMember(Name = "key")] - public string? Property { get; set; } - } + [JsonPropertyName("key"), DataMember(Name = "key")] + public string? Property { get; set; } + } - public override MetadataDictionary? Read(ref Utf8JsonReader reader, Type? typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException($"JsonTokenType was of type {reader.TokenType}, only objects are supported"); + /// + public override MetadataDictionary? Read(ref Utf8JsonReader reader, Type? typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException($"JsonTokenType was of type {reader.TokenType}, only objects are supported"); - var dictionary = new MetadataDictionary(); - var originalDepth = reader.CurrentDepth; - while (reader.Read()) + var dictionary = new MetadataDictionary(); + var originalDepth = reader.CurrentDepth; + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) { - if (reader.TokenType == JsonTokenType.EndObject) - { - if (reader.CurrentDepth <= originalDepth) - break; - continue; - } - - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException("JsonTokenType was not PropertyName"); + if (reader.CurrentDepth <= originalDepth) + break; + continue; + } - var propertyName = reader.GetString(); + if (reader.TokenType != JsonTokenType.PropertyName) + throw new JsonException("JsonTokenType was not PropertyName"); - if (propertyName.IsNullOrEmpty()) - throw new JsonException("Failed to get property name"); + var propertyName = reader.GetString(); - reader.Read(); - var value = ExtractValue(ref reader, options); - dictionary.Add(propertyName, value); - } + if (propertyName.IsNullOrEmpty()) + throw new JsonException("Failed to get property name"); - return dictionary.Count > 0 ? dictionary : null; + reader.Read(); + var value = ExtractValue(ref reader, options); + dictionary.Add(propertyName, value); } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "We always provide a static JsonTypeInfoResolver")] - [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "We always provide a static JsonTypeInfoResolver")] - public override void Write(Utf8JsonWriter writer, MetadataDictionary value, JsonSerializerOptions options) - { - writer.WriteStartObject(); + return dictionary.Count > 0 ? dictionary : null; + } + + /// + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "We always provide a static JsonTypeInfoResolver")] + [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "We always provide a static JsonTypeInfoResolver")] + public override void Write(Utf8JsonWriter writer, MetadataDictionary value, JsonSerializerOptions options) + { + writer.WriteStartObject(); - List? failures = null; + List? failures = null; - foreach (var kvp in value) - { - var propertyName = kvp.Key; + foreach (var kvp in value) + { + var propertyName = kvp.Key; - if (kvp.Value == null) + if (kvp.Value == null) + { + writer.WritePropertyName(propertyName); + writer.WriteNullValue(); + } + else + { + try { + // The following is not safe + // JsonSerializer.Serialize(writer, kvp.Value, inputType, options); + // If a getter throws an exception we risk not logging anything + + var bytes = JsonSerializer.SerializeToUtf8Bytes(kvp.Value, options); writer.WritePropertyName(propertyName); - writer.WriteNullValue(); + writer.WriteRawValue(bytes); } - else + catch (Exception e) { - try - { - // The following is not safe - // JsonSerializer.Serialize(writer, kvp.Value, inputType, options); - // If a getter throws an exception we risk not logging anything - - var bytes = JsonSerializer.SerializeToUtf8Bytes(kvp.Value, options); - writer.WritePropertyName(propertyName); - writer.WriteRawValue(bytes); - } - catch (Exception e) - { - failures ??= new List(); - failures.Add(new MetaDataSerializationFailure { Property = propertyName, SerializationFailure = e.Message }); - } + failures ??= new List(); + failures.Add(new MetaDataSerializationFailure { Property = propertyName, SerializationFailure = e.Message }); } } - if (failures != null) - { - writer.WritePropertyName("__failures__"); - JsonSerializer.Serialize(writer, failures, typeof(List), options); - } - writer.WriteEndObject(); } + if (failures != null) + { + writer.WritePropertyName("__failures__"); + JsonSerializer.Serialize(writer, failures, typeof(List), options); + } + writer.WriteEndObject(); + } - private object? ExtractValue(ref Utf8JsonReader reader, JsonSerializerOptions options) + private object? ExtractValue(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (reader.TokenType) { - switch (reader.TokenType) - { - case JsonTokenType.String when reader.TryGetDateTime(out var date): return date; - case JsonTokenType.String: return reader.GetString(); - case JsonTokenType.False: return false; - case JsonTokenType.True: return true; - case JsonTokenType.Null: return null; - case JsonTokenType.Number: - return reader.TryGetInt64(out var result) ? result : reader.TryGetDouble(out var d) ? d : reader.GetDecimal(); - case JsonTokenType.StartObject: - return Read(ref reader, null, options); - case JsonTokenType.StartArray: - var list = new List(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) list.Add(ExtractValue(ref reader, options)); - return list; - case JsonTokenType.None: - case JsonTokenType.EndObject: - case JsonTokenType.EndArray: - case JsonTokenType.PropertyName: - case JsonTokenType.Comment: - default: - throw new JsonException($"'{reader.TokenType}' is not supported"); - } + case JsonTokenType.String when reader.TryGetDateTime(out var date): return date; + case JsonTokenType.String: return reader.GetString(); + case JsonTokenType.False: return false; + case JsonTokenType.True: return true; + case JsonTokenType.Null: return null; + case JsonTokenType.Number: + return reader.TryGetInt64(out var result) ? result : reader.TryGetDouble(out var d) ? d : reader.GetDecimal(); + case JsonTokenType.StartObject: + return Read(ref reader, null, options); + case JsonTokenType.StartArray: + var list = new List(); + while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) list.Add(ExtractValue(ref reader, options)); + return list; + case JsonTokenType.None: + case JsonTokenType.EndObject: + case JsonTokenType.EndArray: + case JsonTokenType.PropertyName: + case JsonTokenType.Comment: + default: + throw new JsonException($"'{reader.TokenType}' is not supported"); } } } diff --git a/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.Generated.cs b/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.Generated.cs index 7e92eb2e..ee5c91f5 100644 --- a/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.Generated.cs +++ b/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.Generated.cs @@ -5,7 +5,7 @@ /* IMPORTANT NOTE ============== -This file has been generated. +This file has been generated. If you wish to submit a PR please modify the original csharp file and submit the PR with that change. Thanks! */ @@ -18,7 +18,7 @@ namespace Elastic.CommonSchema.Serialization; /// Specialized converter for -internal partial class LogEntityJsonConverter : PropertiesReaderJsonConverterBase +public partial class LogEntityJsonConverter : PropertiesReaderJsonConverterBase { /// protected override bool ReadProperties(ref Utf8JsonReader reader, Log ecsEvent, JsonSerializerOptions options) @@ -39,7 +39,7 @@ protected override bool ReadProperties(ref Utf8JsonReader reader, Log ecsEvent, } private partial bool ReadProperty(ref Utf8JsonReader reader, string propertyName, Log ecsEvent, JsonSerializerOptions options); - + /// public override void Write(Utf8JsonWriter writer, Log value, JsonSerializerOptions options) { @@ -62,7 +62,7 @@ public override void Write(Utf8JsonWriter writer, Log value, JsonSerializerOptio } /// Specialized converter for -internal partial class EcsEntityJsonConverter : PropertiesReaderJsonConverterBase +public partial class EcsEntityJsonConverter : PropertiesReaderJsonConverterBase { /// protected override bool ReadProperties(ref Utf8JsonReader reader, Ecs ecsEvent, JsonSerializerOptions options) @@ -77,7 +77,7 @@ protected override bool ReadProperties(ref Utf8JsonReader reader, Ecs ecsEvent, } private partial bool ReadProperty(ref Utf8JsonReader reader, string propertyName, Ecs ecsEvent, JsonSerializerOptions options); - + /// public override void Write(Utf8JsonWriter writer, Ecs value, JsonSerializerOptions options) { diff --git a/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.cs b/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.cs index 5664a863..c83cd94b 100644 --- a/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.cs +++ b/src/Elastic.CommonSchema/Serialization/PropertiesReaderJsonConverterBase.cs @@ -52,7 +52,7 @@ public abstract class PropertiesReaderJsonConverterBase : EcsJsonConverterBas protected abstract bool ReadProperties(ref Utf8JsonReader reader, T ecsEvent, JsonSerializerOptions options); } -internal partial class EcsEntityJsonConverter +public partial class EcsEntityJsonConverter { private partial bool ReadProperty(ref Utf8JsonReader reader, string propertyName, Ecs ecsEvent, JsonSerializerOptions options) => false; } @@ -86,7 +86,7 @@ public class LogOriginInvalid } } -internal partial class LogEntityJsonConverter +public partial class LogEntityJsonConverter { private partial bool ReadProperty(ref Utf8JsonReader reader, string propertyName, Log ecsEvent, JsonSerializerOptions options) => propertyName switch diff --git a/src/Elastic.CommonSchema/Serialization/SnakeCaseJsonNamingPolicy.cs b/src/Elastic.CommonSchema/Serialization/SnakeCaseJsonNamingPolicy.cs index f51a86ed..89c8170e 100644 --- a/src/Elastic.CommonSchema/Serialization/SnakeCaseJsonNamingPolicy.cs +++ b/src/Elastic.CommonSchema/Serialization/SnakeCaseJsonNamingPolicy.cs @@ -5,39 +5,41 @@ using System.Text; using System.Text.Json; -namespace Elastic.CommonSchema.Serialization +namespace Elastic.CommonSchema.Serialization; + +/// snake_case naming policy +public class SnakeCaseJsonNamingPolicy : JsonNamingPolicy { - internal class SnakeCaseJsonNamingPolicy : JsonNamingPolicy + /// Turn string into snake_case + public static string ToSnakeCase(string s) { - public static string ToSnakeCase(string s) - { - if (string.IsNullOrEmpty(s)) return s; + if (string.IsNullOrEmpty(s)) return s; - var sb = new StringBuilder(); - for (var i = 0; i < s.Length; i++) + var sb = new StringBuilder(); + for (var i = 0; i < s.Length; i++) + { + var c = s[i]; + if (!char.IsUpper(c)) { - var c = s[i]; - if (!char.IsUpper(c)) - { - sb.Append(c); - continue; - } - // first - if (i == 0) - sb.Append(char.ToLowerInvariant(c)); - else if (char.IsUpper(s[i - 1])) // WriteIO => write_io - sb.Append(char.ToLowerInvariant(c)); - else if (s[i - 1] == '_') // User_Id => user_id - sb.Append(char.ToLowerInvariant(c)); - else - { - sb.Append("_"); - sb.Append(char.ToLowerInvariant(c)); - } + sb.Append(c); + continue; + } + // first + if (i == 0) + sb.Append(char.ToLowerInvariant(c)); + else if (char.IsUpper(s[i - 1])) // WriteIO => write_io + sb.Append(char.ToLowerInvariant(c)); + else if (s[i - 1] == '_') // User_Id => user_id + sb.Append(char.ToLowerInvariant(c)); + else + { + sb.Append("_"); + sb.Append(char.ToLowerInvariant(c)); } - return sb.ToString(); } - - public override string ConvertName(string name) => ToSnakeCase(name); + return sb.ToString(); } + + /// convert to snake_case + public override string ConvertName(string name) => ToSnakeCase(name); } diff --git a/src/Elastic.Extensions.Logging.Common/Elastic.Extensions.Logging.Common.csproj b/src/Elastic.Extensions.Logging.Common/Elastic.Extensions.Logging.Common.csproj index 6dabd925..ad722c0d 100644 --- a/src/Elastic.Extensions.Logging.Common/Elastic.Extensions.Logging.Common.csproj +++ b/src/Elastic.Extensions.Logging.Common/Elastic.Extensions.Logging.Common.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0 + netstandard2.0;netstandard2.1;net8.0;net10.0 Common Abstactions For ECS For Microsoft.Extensions.Logging Transient dependency, do not install directly. Common Abstactions For ECS For Microsoft.Extensions.Logging Logging;LoggerProvider;Elasticsearch;Console;ELK;Kibana;Logstash;Tracing;Diagnostics;Log;Trace;ECS @@ -14,8 +14,14 @@ - + + + + + + + diff --git a/src/Elastic.Extensions.Logging.Console/Elastic.Extensions.Logging.Console.csproj b/src/Elastic.Extensions.Logging.Console/Elastic.Extensions.Logging.Console.csproj index 5a66ae52..1938ebe5 100644 --- a/src/Elastic.Extensions.Logging.Console/Elastic.Extensions.Logging.Console.csproj +++ b/src/Elastic.Extensions.Logging.Console/Elastic.Extensions.Logging.Console.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0 + netstandard2.0;netstandard2.1;net8.0;net10.0 enable ECS Console Logger for Microsoft.Extensions.Logging ECS Console Logger for Microsoft.Extensions.Logging. Writes Elastic Common Schema (ECS), with semantic logging of structured data from message and scope values to console out, use filebeat/Elastic-Agent to send these to Elastic @@ -10,9 +10,15 @@ True - + + + + + + + diff --git a/src/Elastic.Extensions.Logging/Elastic.Extensions.Logging.csproj b/src/Elastic.Extensions.Logging/Elastic.Extensions.Logging.csproj index f8c13c30..151f28ae 100644 --- a/src/Elastic.Extensions.Logging/Elastic.Extensions.Logging.csproj +++ b/src/Elastic.Extensions.Logging/Elastic.Extensions.Logging.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net8.0;net10.0 Elasticsearch Logger Provider Elasticsearch logger provider for Microsoft.Extensions.Logging. Writes direct to Elasticsearch using the Elastic Common Schema (ECS), with semantic logging of structured data from message and scope values, for use with the Elasticsearch-Logstash-Kibana (ELK) stack. The results can be viewed and queried in the Kibana console. Logging;LoggerProvider;Elasticsearch;ELK;Kibana;Logstash;Tracing;Diagnostics;Log;Trace;ECS @@ -9,8 +9,16 @@ True + + + + + + + + + - diff --git a/src/Elastic.Extensions.Logging/ElasticsearchLoggerOptionsSetup.cs b/src/Elastic.Extensions.Logging/ElasticsearchLoggerOptionsSetup.cs index c018b51b..a166cb2e 100644 --- a/src/Elastic.Extensions.Logging/ElasticsearchLoggerOptionsSetup.cs +++ b/src/Elastic.Extensions.Logging/ElasticsearchLoggerOptionsSetup.cs @@ -2,11 +2,14 @@ // 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.CodeAnalysis; using Elastic.Extensions.Logging.Options; using Microsoft.Extensions.Logging.Configuration; using Microsoft.Extensions.Options; namespace Elastic.Extensions.Logging; +[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "We always provide a static JsonTypeInfoResolver")] +[UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "We always provide a static JsonTypeInfoResolver")] internal class ElasticsearchLoggerOptionsSetup(ILoggerProviderConfiguration providerConfiguration) : ConfigureFromConfigurationOptions(providerConfiguration.Configuration); diff --git a/src/Elastic.Ingest.Elasticsearch.CommonSchema/Elastic.Ingest.Elasticsearch.CommonSchema.csproj b/src/Elastic.Ingest.Elasticsearch.CommonSchema/Elastic.Ingest.Elasticsearch.CommonSchema.csproj index ac3e4276..a62451ad 100644 --- a/src/Elastic.Ingest.Elasticsearch.CommonSchema/Elastic.Ingest.Elasticsearch.CommonSchema.csproj +++ b/src/Elastic.Ingest.Elasticsearch.CommonSchema/Elastic.Ingest.Elasticsearch.CommonSchema.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0 + netstandard2.0;netstandard2.1;net8.0;net10.0 True @@ -10,7 +10,7 @@ - + diff --git a/src/Elastic.NLog.Targets/Elastic.NLog.Targets.csproj b/src/Elastic.NLog.Targets/Elastic.NLog.Targets.csproj index de14d2ab..699e29d3 100644 --- a/src/Elastic.NLog.Targets/Elastic.NLog.Targets.csproj +++ b/src/Elastic.NLog.Targets/Elastic.NLog.Targets.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0 + netstandard2.0;netstandard2.1;net8.0;net10.0 Elasticsearch NLog Target NLog Target that exports directly to Elastic Cloud or individual Elasticsearch nodes NLog.Targets diff --git a/src/Elastic.Serilog.Enrichers.Web/Elastic.Serilog.Enrichers.Web.csproj b/src/Elastic.Serilog.Enrichers.Web/Elastic.Serilog.Enrichers.Web.csproj index f429997c..b483f554 100644 --- a/src/Elastic.Serilog.Enrichers.Web/Elastic.Serilog.Enrichers.Web.csproj +++ b/src/Elastic.Serilog.Enrichers.Web/Elastic.Serilog.Enrichers.Web.csproj @@ -1,7 +1,7 @@ - net8.0;net462 + net8.0;net10.0;net462 enable enable Elastic Common Schema (ECS) Serilog Enricher for Web proeprties @@ -15,7 +15,7 @@ - + diff --git a/src/Elastic.Serilog.Sinks/Elastic.Serilog.Sinks.csproj b/src/Elastic.Serilog.Sinks/Elastic.Serilog.Sinks.csproj index dbc21715..c9ad3e72 100644 --- a/src/Elastic.Serilog.Sinks/Elastic.Serilog.Sinks.csproj +++ b/src/Elastic.Serilog.Sinks/Elastic.Serilog.Sinks.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0 + netstandard2.0;netstandard2.1;net8.0;net10.0 enable True diff --git a/src/Specification/Specification.csproj b/src/Specification/Specification.csproj index 80040b96..11135324 100644 --- a/src/Specification/Specification.csproj +++ b/src/Specification/Specification.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 False diff --git a/tests-integration/Directory.Build.props b/tests-integration/Directory.Build.props index c4ff544d..57533244 100644 --- a/tests-integration/Directory.Build.props +++ b/tests-integration/Directory.Build.props @@ -12,13 +12,12 @@ - - + - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BdNetExporterTests.cs b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BdNetExporterTests.cs index b790be8c..9b20b2b4 100644 --- a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BdNetExporterTests.cs +++ b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BdNetExporterTests.cs @@ -94,7 +94,7 @@ public async Task BenchmarkingPersistsResults() var doc = searchResponse.Documents.First(); - doc.Timestamp.Should().NotBeNull().And.BeCloseTo(DateTimeOffset.UtcNow, precision: 600000); + doc.Timestamp.Should().NotBeNull().And.BeCloseTo(DateTimeOffset.UtcNow, precision: TimeSpan.FromDays(1)); doc.Benchmark.Should().NotBeNull(); @@ -102,6 +102,7 @@ public async Task BenchmarkingPersistsResults() if (doc.Benchmark.Success) { doc.Benchmark.Max.Should().BeGreaterThan(0); + doc.Event.Should().NotBeNull(); doc.Event.Duration.Should().BeGreaterThan(0); //searchResponse.Total.Should().Be(summary.BenchmarksCases.Length); searchResponse.Total.Should().BeGreaterThan(0); diff --git a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BenchmarkCluster.cs b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BenchmarkCluster.cs index 5a830f1f..bd7ddc60 100644 --- a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BenchmarkCluster.cs +++ b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/BenchmarkCluster.cs @@ -6,9 +6,5 @@ namespace Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests { /// Declare our cluster that we want to inject into our test classes - public class BenchmarkCluster : TestClusterBase - { - public BenchmarkCluster() : base(9203) { } - - } + public class BenchmarkCluster() : TestClusterBase(9203); } diff --git a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests.csproj b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests.csproj index 5f64723d..9718f136 100644 --- a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests.csproj +++ b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests.csproj @@ -1,18 +1,14 @@ - net8.0 + net10.0 false - - 9.0 - - - + diff --git a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Md5VsSha256.cs b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Md5VsSha256.cs index 00249378..bae7a3e6 100644 --- a/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Md5VsSha256.cs +++ b/tests-integration/Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests/Md5VsSha256.cs @@ -2,28 +2,26 @@ using System.Security.Cryptography; using BenchmarkDotNet.Attributes; -namespace Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests +namespace Elastic.CommonSchema.BenchmarkDotNetExporter.IntegrationTests; + +public class Md5VsSha256 { - public class Md5VsSha256 - { - private readonly SHA256 _sha256 = SHA256.Create(); - private readonly MD5 _md5 = MD5.Create(); - private byte[] _data; + private readonly SHA256 _sha256 = SHA256.Create(); + private readonly MD5 _md5 = MD5.Create(); + private byte[] _data; - [Params(1000, 10000)] - public int N; + public int N { get; set; } = 100; - [GlobalSetup] - public void Setup() - { - _data = new byte[N]; - new Random(42).NextBytes(_data); - } + [GlobalSetup] + public void Setup() + { + _data = new byte[N]; + new Random(42).NextBytes(_data); + } - [Benchmark] - public byte[] Sha256() => _sha256.ComputeHash(_data); + [Benchmark] + public byte[] Sha256() => _sha256.ComputeHash(_data); - [Benchmark] - public byte[] Md5() => _md5.ComputeHash(_data); - } + [Benchmark] + public byte[] Md5() => _md5.ComputeHash(_data); } diff --git a/tests-integration/Elastic.Extensions.Logging.IntegrationTests/Elastic.Extensions.Logging.IntegrationTests.csproj b/tests-integration/Elastic.Extensions.Logging.IntegrationTests/Elastic.Extensions.Logging.IntegrationTests.csproj index 7b467d62..781d0cf8 100644 --- a/tests-integration/Elastic.Extensions.Logging.IntegrationTests/Elastic.Extensions.Logging.IntegrationTests.csproj +++ b/tests-integration/Elastic.Extensions.Logging.IntegrationTests/Elastic.Extensions.Logging.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 false @@ -10,8 +10,4 @@ - - - - diff --git a/tests-integration/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests.csproj b/tests-integration/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests.csproj index ffda2141..10c6902b 100644 --- a/tests-integration/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests.csproj +++ b/tests-integration/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests/Elastic.Ingest.Elasticsearch.CommonSchema.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable @@ -14,7 +14,4 @@ - - - diff --git a/tests-integration/Elastic.NLog.Targets.IntegrationTests/Elastic.NLog.Targets.IntegrationTests.csproj b/tests-integration/Elastic.NLog.Targets.IntegrationTests/Elastic.NLog.Targets.IntegrationTests.csproj index a356eeca..4dae1e3e 100644 --- a/tests-integration/Elastic.NLog.Targets.IntegrationTests/Elastic.NLog.Targets.IntegrationTests.csproj +++ b/tests-integration/Elastic.NLog.Targets.IntegrationTests/Elastic.NLog.Targets.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 false NLog.Targets.Elastic.IntegrationTests @@ -11,8 +11,4 @@ - - - - diff --git a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/BootstrapMinimumSecurityPrivilegesTests.cs b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/BootstrapMinimumSecurityPrivilegesTests.cs index df828d9d..91b1c0db 100644 --- a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/BootstrapMinimumSecurityPrivilegesTests.cs +++ b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/BootstrapMinimumSecurityPrivilegesTests.cs @@ -114,7 +114,7 @@ protected SecurityPrivilegesTestsBase(SecurityCluster cluster, ITestOutputHelper var loggerConfig = new LoggerConfiguration() .MinimumLevel.Information() - .WriteTo.ColoredConsole() + .WriteTo.Console() .WriteTo.Elasticsearch(SinkOptions); using var logger = loggerConfig.CreateLogger(); diff --git a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/Elastic.Serilog.Sinks.IntegrationTests.csproj b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/Elastic.Serilog.Sinks.IntegrationTests.csproj index e583345f..9164f267 100644 --- a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/Elastic.Serilog.Sinks.IntegrationTests.csproj +++ b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/Elastic.Serilog.Sinks.IntegrationTests.csproj @@ -1,15 +1,14 @@  - net8.0 + net10.0 latest False enable - - + diff --git a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogOutputTests.cs b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogOutputTests.cs index 095e1805..ef4e4281 100644 --- a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogOutputTests.cs +++ b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogOutputTests.cs @@ -50,7 +50,7 @@ public SerilogOutputTests(SerilogCluster cluster, ITestOutputHelper output) : ba var loggerConfig = new LoggerConfiguration() .MinimumLevel.Information() - .WriteTo.ColoredConsole() + .WriteTo.Console() .WriteTo.Elasticsearch(SinkOptions); using var logger = loggerConfig.CreateLogger(); diff --git a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogSelfLogTests.cs b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogSelfLogTests.cs index 47a00db1..e54b7982 100644 --- a/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogSelfLogTests.cs +++ b/tests-integration/Elastic.Serilog.Sinks.IntegrationTests/SerilogSelfLogTests.cs @@ -54,7 +54,7 @@ [I] public void AssertLogs() var loggerConfig = new LoggerConfiguration() .MinimumLevel.Information() - .WriteTo.ColoredConsole() + .WriteTo.Console() .WriteTo.Elasticsearch(SinkOptions); using var logger = loggerConfig.CreateLogger(); diff --git a/tests-integration/Elasticsearch.IntegrationDefaults/Elasticsearch.IntegrationDefaults.csproj b/tests-integration/Elasticsearch.IntegrationDefaults/Elasticsearch.IntegrationDefaults.csproj index c04fc652..6564dd8a 100644 --- a/tests-integration/Elasticsearch.IntegrationDefaults/Elasticsearch.IntegrationDefaults.csproj +++ b/tests-integration/Elasticsearch.IntegrationDefaults/Elasticsearch.IntegrationDefaults.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable Library @@ -9,9 +9,9 @@ - - - + + + diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 7c43ffca..15b1c263 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -12,13 +12,16 @@ - - + - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Elastic.Apm.Disabled.Serilog.Tests/Elastic.Apm.Disabled.Serilog.Tests.csproj b/tests/Elastic.Apm.Disabled.Serilog.Tests/Elastic.Apm.Disabled.Serilog.Tests.csproj index 7bf91782..1f55d111 100644 --- a/tests/Elastic.Apm.Disabled.Serilog.Tests/Elastic.Apm.Disabled.Serilog.Tests.csproj +++ b/tests/Elastic.Apm.Disabled.Serilog.Tests/Elastic.Apm.Disabled.Serilog.Tests.csproj @@ -1,16 +1,15 @@ - net8.0 + net10.0 enable enable - - - - + + + diff --git a/tests/Elastic.Apm.NLog.Tests/Elastic.Apm.NLog.Tests.csproj b/tests/Elastic.Apm.NLog.Tests/Elastic.Apm.NLog.Tests.csproj index 28509887..286266d3 100644 --- a/tests/Elastic.Apm.NLog.Tests/Elastic.Apm.NLog.Tests.csproj +++ b/tests/Elastic.Apm.NLog.Tests/Elastic.Apm.NLog.Tests.csproj @@ -1,15 +1,14 @@ - net8.0 + net10.0 - - + + - diff --git a/tests/Elastic.Apm.SerilogEnricher.Tests/Elastic.Apm.SerilogEnricher.Tests.csproj b/tests/Elastic.Apm.SerilogEnricher.Tests/Elastic.Apm.SerilogEnricher.Tests.csproj index dbbbca31..4157fb9c 100644 --- a/tests/Elastic.Apm.SerilogEnricher.Tests/Elastic.Apm.SerilogEnricher.Tests.csproj +++ b/tests/Elastic.Apm.SerilogEnricher.Tests/Elastic.Apm.SerilogEnricher.Tests.csproj @@ -2,13 +2,12 @@ Exe - net8.0 + net10.0 - - - + + diff --git a/tests/Elastic.Apm.Test.Common/Elastic.Apm.Test.Common.csproj b/tests/Elastic.Apm.Test.Common/Elastic.Apm.Test.Common.csproj index 80284a55..c42e7f2a 100644 --- a/tests/Elastic.Apm.Test.Common/Elastic.Apm.Test.Common.csproj +++ b/tests/Elastic.Apm.Test.Common/Elastic.Apm.Test.Common.csproj @@ -5,7 +5,7 @@ - + diff --git a/tests/Elastic.Apm.Test.Common/MockConfiguration.cs b/tests/Elastic.Apm.Test.Common/MockConfiguration.cs index 72337121..ad86613b 100644 --- a/tests/Elastic.Apm.Test.Common/MockConfiguration.cs +++ b/tests/Elastic.Apm.Test.Common/MockConfiguration.cs @@ -11,32 +11,24 @@ namespace Elastic.Apm.Test.Common { - public class MockConfiguration : IConfigurationReader + public class MockConfiguration( + string serviceName, + string serviceNodeName, + string serviceVersion, + bool enabled = true, + IReadOnlyDictionary globalLabels = null + ) + : IConfigurationReader { - public MockConfiguration( - string serviceName, - string serviceNodeName, - string serviceVersion, - bool enabled = true, - IReadOnlyDictionary globalLabels = null - ) - { - GlobalLabels = globalLabels; - ServiceName = serviceName; - ServiceNodeName = serviceNodeName; - ServiceVersion = serviceVersion; - Enabled = enabled; - Recording = true; - } + public bool Enabled { get; } = enabled; - public bool Enabled { get; } + public string Description => nameof(MockConfiguration); + public IReadOnlyList BaggageToAttach { get; } - public string Description { get; } = nameof(MockConfiguration); - - public IReadOnlyDictionary GlobalLabels { get; } - public string ServiceName { get; } - public string ServiceNodeName { get; } - public string ServiceVersion { get; } + public IReadOnlyDictionary GlobalLabels { get; } = globalLabels; + public string ServiceName { get; } = serviceName; + public string ServiceNodeName { get; } = serviceNodeName; + public string ServiceVersion { get; } = serviceVersion; public IReadOnlyList SanitizeFieldNames { get; } = Array.Empty(); public IReadOnlyList ServerUrls { get; } = Array.Empty(); @@ -46,7 +38,7 @@ public MockConfiguration( // ReSharper disable UnassignedGetOnlyAutoProperty public IReadOnlyList IgnoreMessageQueues { get; } - public bool Recording { get; } + public bool Recording { get; } = true; public string HostName { get; } public string ServerCert { get; } public Uri ServerUrl { get; } @@ -69,10 +61,25 @@ public MockConfiguration( public bool TraceContextIgnoreSampledFalse { get; } public string TraceContinuationStrategy { get; } public IReadOnlyList TransactionIgnoreUrls { get; } + + /// + public IReadOnlyCollection TransactionNameGroups { get; } public int TransactionMaxSpans { get; } public double TransactionSampleRate { get; } public bool UseElasticTraceparentHeader { get; } + + /// + public bool UsePathAsTransactionName { get; } public bool VerifyServerCert { get; } + + /// + public Uri ProxyUrl { get; } + + /// + public string ProxyUserName { get; } + + /// + public string ProxyPassword { get; } public bool OpenTelemetryBridgeEnabled { get; } public bool UseWindowsCredentials { get; } public bool SpanCompressionEnabled { get; } @@ -80,5 +87,8 @@ public MockConfiguration( public double SpanCompressionSameKindMaxDuration { get; } public double SpanStackTraceMinDurationInMilliseconds { get; } // ReSharper restore UnassignedGetOnlyAutoProperty + + /// + public ConfigurationKeyValue Lookup(ConfigurationOption option) => null; } } diff --git a/tests/Elastic.CommonSchema.Log4net.Tests/Elastic.CommonSchema.Log4net.Tests.csproj b/tests/Elastic.CommonSchema.Log4net.Tests/Elastic.CommonSchema.Log4net.Tests.csproj index fd01ee34..18503ee6 100644 --- a/tests/Elastic.CommonSchema.Log4net.Tests/Elastic.CommonSchema.Log4net.Tests.csproj +++ b/tests/Elastic.CommonSchema.Log4net.Tests/Elastic.CommonSchema.Log4net.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 false @@ -10,8 +10,4 @@ - - - - diff --git a/tests/Elastic.CommonSchema.Log4net.Tests/MessageTests.cs b/tests/Elastic.CommonSchema.Log4net.Tests/MessageTests.cs index 5152d95e..3f9f3df9 100644 --- a/tests/Elastic.CommonSchema.Log4net.Tests/MessageTests.cs +++ b/tests/Elastic.CommonSchema.Log4net.Tests/MessageTests.cs @@ -95,7 +95,7 @@ public void ToEcs_AnyEvent_PopulatesHostField() => TestLogger((log, getLogEvents info.Host.Should().NotBeNull(); var fqdn = loggingEvent.LookupProperty(LoggingEvent.HostNameProperty).ToString(); fqdn.Should().NotBeNullOrEmpty(); - info.Host.Hostname.Should().StartWithEquivalent(fqdn.Split('.', StringSplitOptions.None).First()); + info.Host.Hostname.Should().StartWithEquivalentOf(fqdn.Split('.', StringSplitOptions.None).First()); }); [Fact] diff --git a/tests/Elastic.CommonSchema.NLog.Tests/Elastic.CommonSchema.NLog.Tests.csproj b/tests/Elastic.CommonSchema.NLog.Tests/Elastic.CommonSchema.NLog.Tests.csproj index 5abe6c21..23ed8b19 100644 --- a/tests/Elastic.CommonSchema.NLog.Tests/Elastic.CommonSchema.NLog.Tests.csproj +++ b/tests/Elastic.CommonSchema.NLog.Tests/Elastic.CommonSchema.NLog.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 false NU1701 @@ -10,8 +10,7 @@ - - + diff --git a/tests/Elastic.CommonSchema.Serilog.Tests/Elastic.CommonSchema.Serilog.Tests.csproj b/tests/Elastic.CommonSchema.Serilog.Tests/Elastic.CommonSchema.Serilog.Tests.csproj index 0d29fce6..01ff8a9e 100644 --- a/tests/Elastic.CommonSchema.Serilog.Tests/Elastic.CommonSchema.Serilog.Tests.csproj +++ b/tests/Elastic.CommonSchema.Serilog.Tests/Elastic.CommonSchema.Serilog.Tests.csproj @@ -1,31 +1,30 @@  - - net8.0 + + net10.0 - false - SYSLIB1015;SYSLIB1014 - + false + SYSLIB1015;SYSLIB1014 + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + diff --git a/tests/Elastic.CommonSchema.Tests/Elastic.CommonSchema.Tests.csproj b/tests/Elastic.CommonSchema.Tests/Elastic.CommonSchema.Tests.csproj index 0785c9e1..fc225661 100644 --- a/tests/Elastic.CommonSchema.Tests/Elastic.CommonSchema.Tests.csproj +++ b/tests/Elastic.CommonSchema.Tests/Elastic.CommonSchema.Tests.csproj @@ -1,12 +1,12 @@ - net8.0 + net10.0 false - + diff --git a/tests/Elastic.CommonSchema.Tests/Specs/Spec.cs b/tests/Elastic.CommonSchema.Tests/Specs/Spec.cs index 7627bf3e..82f917e2 100644 --- a/tests/Elastic.CommonSchema.Tests/Specs/Spec.cs +++ b/tests/Elastic.CommonSchema.Tests/Specs/Spec.cs @@ -83,7 +83,7 @@ private static void ValidateType(JProperty property, JObject specFieldValue) prop.Value.Type.Should().Be(JTokenType.String, $"label {prop.Name} holds {prop.Value.Type} but may only hold string"); break; default: - Assert.True(false, $"Cannot yet assert on {type}. Add assertion for this type: {property.Path}"); + Assert.Fail($"Cannot yet assert on {type}. Add assertion for this type: {property.Path}"); break; } } diff --git a/tests/Elastic.Serilog.Sinks.Tests/Elastic.Serilog.Sinks.Tests.csproj b/tests/Elastic.Serilog.Sinks.Tests/Elastic.Serilog.Sinks.Tests.csproj index 7ad6b70f..ca437f7d 100644 --- a/tests/Elastic.Serilog.Sinks.Tests/Elastic.Serilog.Sinks.Tests.csproj +++ b/tests/Elastic.Serilog.Sinks.Tests/Elastic.Serilog.Sinks.Tests.csproj @@ -1,10 +1,10 @@ - net8.0 + net10.0 enable enable - preview + latest @@ -12,13 +12,12 @@ - - + + - - - - + + + diff --git a/tools/Elastic.CommonSchema.Benchmarks/Elastic.CommonSchema.Benchmarks.csproj b/tools/Elastic.CommonSchema.Benchmarks/Elastic.CommonSchema.Benchmarks.csproj index 303d6f06..4e662522 100644 --- a/tools/Elastic.CommonSchema.Benchmarks/Elastic.CommonSchema.Benchmarks.csproj +++ b/tools/Elastic.CommonSchema.Benchmarks/Elastic.CommonSchema.Benchmarks.csproj @@ -2,12 +2,12 @@ Exe - net8.0 + net10.0 - + diff --git a/tools/Elastic.CommonSchema.Generator/Elastic.CommonSchema.Generator.csproj b/tools/Elastic.CommonSchema.Generator/Elastic.CommonSchema.Generator.csproj index ef26f0ea..85ce6d1f 100644 --- a/tools/Elastic.CommonSchema.Generator/Elastic.CommonSchema.Generator.csproj +++ b/tools/Elastic.CommonSchema.Generator/Elastic.CommonSchema.Generator.csproj @@ -2,11 +2,12 @@ Exe - net8.0 + net10.0 False False true latest + false