elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs.Persistence.Relational
Sipke Schoorstra 0687b5f9f3
Fix SQLite structured log shell lifecycle (#7461)
* Fix SQLite structured log shell lifecycle

* Address Greptile lifecycle feedback

* Tighten structured log lifecycle guards

* Address structured log background task review
2026-05-18 01:04:04 +02:00
..
Contracts [codex] Expose structured log storage diagnostics (#7446) 2026-05-13 16:32:23 +02:00
Extensions Fix SQLite structured log shell lifecycle (#7461) 2026-05-18 01:04:04 +02:00
Features [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
Migrations [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
Models [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
Options [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
Services Fix SQLite structured log shell lifecycle (#7461) 2026-05-18 01:04:04 +02:00
ShellFeatures Fix SQLite structured log shell lifecycle (#7461) 2026-05-18 01:04:04 +02:00
Stores [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
Elsa.Diagnostics.StructuredLogs.Persistence.Relational.csproj [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
FodyWeavers.xml [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
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.