Phase 6.1 Stream C - Health endpoints on :4841 + structured logging + Serilog JSON sink #80
Reference in New Issue
Block a user
Delete Branch "phase-6-1-stream-c-health-logging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes Stream C per docs/v2/implementation/phase-6-1-resilience-and-observability.md.
Summary
HealthEndpointsHostonhttp://localhost:4841/(HttpListener; loopback avoids URL-ACL elevation)./healthzreports process uptime + config DB reachable-or-cached;/readyzaggregates per-driver state via newDriverHealthReportpure-function service. State matrix: Healthy/Degraded → 200, NotReady/Faulted → 503. Loopback prefix documented; remote probing expects a reverse proxy.LogContextEnricherinCore.Observabilitypushes DriverInstanceId + DriverType + CapabilityName + CorrelationId onto Serilog LogContext.CapabilityInvokernow wraps everyExecuteAsync/ExecuteWriteAsynccall site in the enricher scope so inner logs emit the fields automatically.Enrich.FromLogContext+ opt-in JSON file sink viaSerilog:WriteJson = trueappsetting usingSerilog.Formatting.Compact.CompactJsonFormatter. One JSON object per line — SIEMs ingest without a regex parser.CapabilityInvokerEnrichmentTests(2) +LogContextEnricherTests(8). End-to-end integration via the invoker confirms context doesn’t leak outside the call site.Test plan
dotnet test: 1016 passing (baseline 906, +110 for Phase 6.1 so far).HealthEndpointsEnabled=falseto avoid :4841 collision under parallel test execution.🤖 Generated with Claude Code