elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs.Persistence.Relational
Sipke Schoorstra b255e0b4c3
[codex] Expose structured log storage diagnostics (#7446)
* Expose structured log storage diagnostics

* Address structured log diagnostics review

* Fix checked storage diagnostics aggregation
2026-05-13 16:32:23 +02:00
..
Contracts [codex] Expose structured log storage diagnostics (#7446) 2026-05-13 16:32:23 +02:00
Extensions [codex] Expose structured log storage diagnostics (#7446) 2026-05-13 16:32:23 +02:00
Features
Migrations
Models
Options
Services
ShellFeatures
Stores
Elsa.Diagnostics.StructuredLogs.Persistence.Relational.csproj
FodyWeavers.xml
README.md [codex] Expose structured log storage diagnostics (#7446) 2026-05-13 16:32:23 +02:00

Elsa Diagnostics Structured Logs Relational Persistence

This package contains the reusable relational storage layer for diagnostics structured logs. It is provider-neutral: concrete packages supply the connection factory, SQL dialect, and FluentMigrator runner wiring.

To add a new relational provider such as SQL Server or PostgreSQL:

  1. Reference this package from the provider package.
  2. Implement IRelationalStructuredLogConnectionFactory.
  3. Implement IRelationalStructuredLogDialect for identifier quoting, parameter prefixing, and result limiting.
  4. Implement IStructuredLogSchemaMigrator using FluentMigrator with the provider-specific runner.
  5. Register those services and call AddRelationalStructuredLogPersistence.

The core Elsa.Diagnostics.StructuredLogs package must remain unaware of provider packages. Provider-specific SQL and migration runner dependencies belong in provider packages.

StructuredLogWriteBuffer reports dropped durable writes through the core IStructuredLogStorageDiagnostics contract. The core endpoint GET /diagnostics/structured-logs/storage returns that provider-neutral count for Studio and other diagnostics clients.