Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 8.1.0 #604

Merged
merged 24 commits into from
Dec 6, 2024
Merged

Release 8.1.0 #604

merged 24 commits into from
Dec 6, 2024

Conversation

ckadluba
Copy link
Member

@ckadluba ckadluba commented Dec 6, 2024

  • Implemented Custom Columns where the Property Name contains a dot is not populated. #542: Column option ResolveHierarchicalPropertyName to force non-hierarchical handling
  • Removed unnecessary exception handlers and let Serilog Core do the SelfLog()
  • Refactoring and performance optimizations in batched and audit sink
  • Create perftest result on release
  • Updated issue template
  • Updated editorconfig
  • Added specific documentation about when SQL SELECT permission is not required

* Updated version to 8.0.1
* Set PackageValidationBaselineVersion to 8.0.0 and EnablePackageValidation to true.
SELECT permissions are not required in all cases.
Upload performance test results as an artifact in release.yml
Refactoring
* Removed DataTableCreator from class MsSqlServerSink. Pushed it down to SqlBulkBatchWriter. This also made it possible to remove reference to System.Data in MsSqlServerSink.
* Removed DataTableCreator from SinkDependencies.
* Removed IBulkBatchWriter interface from SqlInsertStatementWriter. MSSqlServerSink class now has separate instances of ISqlBulkBatchWriter and ISqlLogEventWriter and chooses which one to use based on sink option `UseSqlBulkCopy`.
* Added new class SqlCommandFactory with interface ISqlCommandFactory

Performance optimizations in batched sink
* Generate schema and table string only once and do not use string.Format().
* Do not cast on each column of each log event.

Performance optimizations in audit sink
* Render INSERT string only once and not for each log event since it will not change between log events.
* Do not create a separate SqlCommand for each log event. Reuse the same and set only new SqlConnection, CommandText and parameters for each log event.

Added new tests and adapted existing ones.
Refactoring and Performance Optimizations
Parallel execution of DB tests on the one single local DB led to concurrency problems. Therefore the script now runs tests for each supported target framework in a separate call, avoiding parallelism of the DB tests.
* Disable a property from being resolved hierarchically/structured even if its name contains dots (#542) be addin a new new column option `ResolveHierarchicalPropertyName`.
* Implemented logic in SqlColumn class.
* Implemented reading of new column option from config.

Issue #542
Added unit and integration tests for new functionality.

Issue #542
Use new column option `ResolveHierarchicalPropertyName` in WorkerServiceDemo sample app.

Issue #542
Documented new column option `ResolveHierarchicalPropertyName` in README.md.

Issue #542
…props

Implemented #542: Column option ResolveHierarchicalPropertyName to force non-hierarchical handling
The sink had exceptions handlers when log events could not be written. Those handlers wrote an error message using Serilog's SelfLog() facility. This is now done by the Serilog Core when a sink's Emit() and EmitBatchAsync() methods throw an exception. This is why can remove our handlers, let exceptions propagate and Serilog Core do the work.
A Dispose() call for _sqlBulkBatchWriter was missing in MSSqlServerSink class.
Fixed: dispose SqlBulkBatchWriter in sink
@ckadluba ckadluba merged commit 441f3c5 into main Dec 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant