Problem Statement
The processing worker has a structured Logger class (xstreamroll-processing/src/logger.ts) with correlation IDs, log levels, and JSON output. However, worker.ts uses console.error, console.warn, and console.log directly instead of the structured Logger.
Evidence
// worker.ts — uses console.* directly
console.error(`[${WORKER_ID}] polling failed: ${message}`)
console.warn(`[${WORKER_ID}] dropping malformed event`, event)
console.log(`[${WORKER_ID}] stream processor started...`)
Impact
Worker logs are split between structured JSON (Logger) and unstructured console output. Correlation IDs not applied to worker lifecycle events. Log ingestion tools can't parse console.* lines consistently.
Proposed Solution
Replace all console.* calls in worker.ts with structured Logger calls. Pass the logger to SessionRegistry and EventFilter. Use logger.child() for per-stream context.
Acceptance Criteria
File Map
xstreamroll-processing/src/worker.ts — use Logger
xstreamroll-processing/src/session-registry.ts — accept logger parameter
Labels: observability
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d
Labels: observability
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d
Backlog ID: REPO-045
Problem Statement
The processing worker has a structured Logger class (
xstreamroll-processing/src/logger.ts) with correlation IDs, log levels, and JSON output. However,worker.tsusesconsole.error,console.warn, andconsole.logdirectly instead of the structured Logger.Evidence
Impact
Worker logs are split between structured JSON (Logger) and unstructured console output. Correlation IDs not applied to worker lifecycle events. Log ingestion tools can't parse console.* lines consistently.
Proposed Solution
Replace all
console.*calls inworker.tswith structuredLoggercalls. Pass the logger to SessionRegistry and EventFilter. Uselogger.child()for per-stream context.Acceptance Criteria
console.*in worker.tsFile Map
xstreamroll-processing/src/worker.ts— use Loggerxstreamroll-processing/src/session-registry.ts— accept logger parameterLabels: observability
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d
Labels: observability
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d
Backlog ID: REPO-045