This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically handle
TypeName
parameter for different versions of E…
…lasticsearch (<7, 7 or higher) (#462) * fix file references in the Visual Studio Solution file. * Do not set `TypeName` by default any more. * last version of Elasticsearch that supported user-defined `_type` field - v6.8.x is running out of support on 2022-02-10 (https://www.elastic.co/support/eol) * Automatically handle `ElasticsearchSinkOptions.TypeName` for different versions Elasticsearch (<7, 7+) when `ElasticsearchSinkOptions.DetectElasticsearchVersion` is enabled. * Add unit test for automatic settings of `TypeName` when `DetectElasticsearchVersion` is set to `true`. - Two methods used - instantiate `ElasticsearchSinkState` directly and via `LoggerConfiguration` * Add Elasticsearch v8 template + parsing of Elasticsearch major version to `int` + decision branch for which version of index-template API to use + removal of obsolete `ElasticsearchTemplateProvider.GetTemplate(...)` method overload. * Upgrade to .NET 6.0 and update test-frameworks related NuGet pacakges * Upgrade to Elasticsearch.NET 7.17.5 + handle new "preflight" request https://discuss.elastic.co/t/the-client-is-unable-to-verify-that-the-server-is-elasticsearch-due-to-an-unsuccessful-product-check-call-some-functionality-may-not-be-compatible-if-the-server-is-running-an-unsupported-product/310969/9 "The 7.16 client performs a pre-flight GET request to the root URL of the server before the first request.". * Make `ConnectionStub` a bit more robust . * Use `System.Version` to parse Elasticsearch server version number (similar to what `Elasticsearch.Net` does) * Update NuGet packages * Replace obsolete NuGet package `Serilog.Sinks.ColoredConsole` with `Serilog.Sinks.Console` * Update `Serilog.Sinks.PeriodicBatching` package and reimplent `ElasticsearchSink` so that it does not use obsolete `PeriodicBatchingSink` constructor. * Better handling of Elasticsearch server version number in mocked `ConnectionStub` * Cleanup: refactor to use single `JsonEquals` method. * Turn on `DetectElasticSearchVersion` option by default. Assume version 7 on fallback. * Cleanup: remove unused namespaces * Cleanup: move `ElasticsearchSinkTestsBase` into `Stubs` subfolder. * Refactor: extract `ConnectionStub` into a separate file. * Fix: json comparison in .NET Framework 4.6+ * Run unit-tests on multiple .NET frameworks. * Cleanup: remove unused NUnit runner package. * Use newer, built-in compilation constants. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#conditional-compilation * Use standard MSBuild property `IsPackable` for clarity. * Cleanup: remove unused package refrence. * Update GitHub actions * docs: updated documentation to reflect changes in behavior of the sink. Co-authored-by: Nenad Vicentic <[email protected]>
- Loading branch information
1 parent
306a3aa
commit fa5b097
Showing
61 changed files
with
1,002 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.