Sign in Sign up
nuget

TAF.Kibana.SDK.Serilog

Serilog sink that ships log events to TAF Kibana via the TAF.Kibana.SDK. Version 1.5.5 closes a gap where HttpRequestAuditMiddleware audit docs were silently dropped when Kibana was down. RequestAuditEmitter now appends the LogEntry to the shared IDiskBuffer on WriteAsync failure (or exception) — the sink's existing drain loop replays the doc once Kibana is reachable again. Buffer dependency is optional: the emitter falls back to a LogWarning if IDiskBuffer is not registered (i.e. AddTafHttpRequestAudit used without AddTafKibanaSerilog). Version 1.5.4 merges dev-branch DiskBuffer hardening into the 1.5.x audit-middleware lineage: DrainAsync now tracks attempts in an in-memory dictionary keyed by line content (instead of a counter persisted on each BufferedBatch) so eviction-during-drain no longer resurrects evicted lines from a stale snapshot, the write-back step re-reads the current file under the gate, and the per-line poison cap (KibanaSinkDefaults.MaxBufferReplayAttempts = 5) drops permanently-rejected payloads after the threshold. Attempt counters are pruned at the end of each drain to bound memory growth. The 1.5.x feature surface (audit middleware, IRequestSnapshotBuilder/IRequestAuditEmitter split, IBusContextProvider, HttpLoggingEnricherMiddleware) is preserved. Version 1.5.3 cleans up the audit feature internals — splits HttpRequestAuditMiddleware into IRequestSnapshotBuilder (HTTP context interpretation) and IRequestAuditEmitter (Kibana dispatch), with payload-to-LogEntry mapping in RequestAuditLogEntryMapper. Adds CorrelationId to audit doc Properties (read from X-Correlation-ID response header). Now uses IBusContextProvider for BusContext resolution (DIP). Version 1.5.1 added HttpRequestAuditMiddleware: emits ONE audit document per HTTP request directly via IKibanaClient.Logs.WriteAsync, bypassing Serilog so request body, response body, query string, status code, and elapsed time land in the same ES document. Register with AddTafHttpRequestAudit / UseTafHttpRequestAudit. The original HttpLoggingEnricherMiddleware remains for LogContext enrichment of internal trace logs. Version 1.4.0 added HttpLoggingEnricherMiddleware that captures the HTTP query string, request body, and response body as Serilog properties. Includes a RedactResponseBody hook so consumers can drop heavy fields from read-style responses (e.g. CRUD's /select empties the top-level result array before logging). Provides batched delivery, disk-buffer resilience, secret scrubbing, and BusContext-aware tenant routing.

nuget View on Nuget

Activity

Latest release
2mo ago
Total releases
4
Cadence
~6 days
Last 12 months
4

Details

License
MIT
First release
May 05, 2026
Releases
Version Released
1.5.7 patch
1.5.6 minor
1.2.9 patch
1.2.6 initial