Strukturiertes Logging und Health-Check-System implementieren #54

Open
opened 2025-06-11 20:02:23 +02:00 by Michael · 1 comment
Michael commented 2025-06-11 20:02:23 +02:00 (Migrated from gitea.dragons-at-work.de)

Ziel

Produktionstaugliches Monitoring und Logging für Furt-Ecosystem.

Akzeptanzkriterien

  • Strukturierte JSON-Logs für alle Services
  • Health-Check-Aggregation im Gateway
  • Request-ID-Propagation durch Service-Chain
  • Performance-Metriken-Collection
  • Error-Tracking und Alerting

Logging Structure

{
  "timestamp": "2025-06-11T10:30:00Z",
  "level": "info",
  "service": "gateway",
  "request_id": "req-123",
  "method": "POST",
  "path": "/v1/mail/send",
  "status": 200,
  "duration_ms": 45,
  "client_ip": "192.168.1.100"
}

Health Check System

  • Gateway: Aggregated Service Health
  • Services: Individual Health Status
  • Database Connectivity Checks
  • External Service Dependencies

Monitoring Integration

  • systemd journald Integration
  • Log-File-Rotation
  • Performance-Metrics
  • Error-Rate-Tracking

Definition of Done

  • Consistent Logging across Services
  • Health-Checks funktionieren
  • Request-Tracing implementiert
  • Metrics sind aussagekräftig
  • Production-ready Monitoring

Dependencies

Blocked by: Gateway + Services funktional

## Ziel Produktionstaugliches Monitoring und Logging für Furt-Ecosystem. ## Akzeptanzkriterien - [ ] Strukturierte JSON-Logs für alle Services - [ ] Health-Check-Aggregation im Gateway - [ ] Request-ID-Propagation durch Service-Chain - [ ] Performance-Metriken-Collection - [ ] Error-Tracking und Alerting ## Logging Structure ```json { "timestamp": "2025-06-11T10:30:00Z", "level": "info", "service": "gateway", "request_id": "req-123", "method": "POST", "path": "/v1/mail/send", "status": 200, "duration_ms": 45, "client_ip": "192.168.1.100" } ``` ## Health Check System - Gateway: Aggregated Service Health - Services: Individual Health Status - Database Connectivity Checks - External Service Dependencies ## Monitoring Integration - systemd journald Integration - Log-File-Rotation - Performance-Metrics - Error-Rate-Tracking ## Definition of Done - [ ] Consistent Logging across Services - [ ] Health-Checks funktionieren - [ ] Request-Tracing implementiert - [ ] Metrics sind aussagekräftig - [ ] Production-ready Monitoring ## Dependencies Blocked by: Gateway + Services funktional
michael added this to the v0.1.2 - Gateway Basics milestone 2025-08-14 05:20:48 +02:00
michael removed the
status
blocked
label 2025-09-05 19:37:56 +02:00
Owner

Issue #54 Review: Structured Logging - YAGNI Analysis

Erkenntnisse nach Implementierung:

Feature-Creep statt Low-Tech

  • Logger-Modul: 150+ Zeilen für einfache print() Ersetzung
  • main.lua: Von 30 → 130 Zeilen (+333% Code-Inflation)
  • http_server.lua: Von 250 → 340 Zeilen (+36% Komplexität)
  • Performance-Impact: JSON-Serialization bei jeder Request

🤔 YAGNI - You Ain't Gonna Need It

  • Aktueller Status: Furt läuft stabil, keine Production-Probleme
  • Debugging: Funktioniert mit einfachen print() Statements
  • Monitoring: Noch kein echter Bedarf erkennbar
  • Request-Tracing: Für aktuelle Use-Cases überflüssig

📊 Administrator-Pattern-Warnung

  • Mehr Überwachungs-Code als Business-Logic
  • Kontrolle über Kontrolle - exakt das Pattern das wir kritisieren
  • Enterprise-Bullshit statt pragmatische Lösungen

🎯 Dragons@Work-Prinzipien verletzt

  • "Einfachste Lösung die funktioniert"
  • "Keine vorzeitige Optimierung"
  • "Low-Tech vor High-Tech"
  • "Natürliche Entwicklung statt erzwungene Features"

💡 Entscheidung: Verschiebung auf v0.2.x

Bedingungen für Structured Logging:

  1. Echte Production-Probleme die Logging lösen würde
  2. Mehrere Services die Korrelation brauchen
  3. Performance-Bottlenecks die Identifikation brauchen
  4. Compliance-Anforderungen für Audit-Trails

Aktuell: KEINES dieser Kriterien erfüllt.

🔧 Alternative: Minimales Error-Logging

Falls überhaupt, dann nur:

-- Nur bei echten Fehlern
if error then
    print('{"error":"' .. msg .. '","time":"' .. os.date() .. '"}')
end

Branch feature/structured-logging-health-monitoring bleibt offen für späteren Bedarf.


Milestone: v0.1.2 → v0.2.x
Reason: YAGNI - No current need identified
Lesson: Low-Tech means "don't build what you don't need"

## Issue #54 Review: Structured Logging - YAGNI Analysis **Erkenntnisse nach Implementierung:** ### ❌ **Feature-Creep statt Low-Tech** - Logger-Modul: 150+ Zeilen für einfache `print()` Ersetzung - main.lua: Von 30 → 130 Zeilen (+333% Code-Inflation) - http_server.lua: Von 250 → 340 Zeilen (+36% Komplexität) - **Performance-Impact**: JSON-Serialization bei jeder Request ### 🤔 **YAGNI - You Ain't Gonna Need It** - **Aktueller Status**: Furt läuft stabil, keine Production-Probleme - **Debugging**: Funktioniert mit einfachen `print()` Statements - **Monitoring**: Noch kein echter Bedarf erkennbar - **Request-Tracing**: Für aktuelle Use-Cases überflüssig ### 📊 **Administrator-Pattern-Warnung** - Mehr **Überwachungs-Code** als **Business-Logic** - **Kontrolle über Kontrolle** - exakt das Pattern das wir kritisieren - **Enterprise-Bullshit** statt pragmatische Lösungen ### 🎯 **Dragons@Work-Prinzipien verletzt** - ❌ "Einfachste Lösung die funktioniert" - ❌ "Keine vorzeitige Optimierung" - ❌ "Low-Tech vor High-Tech" - ❌ "Natürliche Entwicklung statt erzwungene Features" ### 💡 **Entscheidung: Verschiebung auf v0.2.x** **Bedingungen für Structured Logging:** 1. **Echte Production-Probleme** die Logging lösen würde 2. **Mehrere Services** die Korrelation brauchen 3. **Performance-Bottlenecks** die Identifikation brauchen 4. **Compliance-Anforderungen** für Audit-Trails **Aktuell: KEINES dieser Kriterien erfüllt.** ### 🔧 **Alternative: Minimales Error-Logging** Falls überhaupt, dann nur: ```lua -- Nur bei echten Fehlern if error then print('{"error":"' .. msg .. '","time":"' .. os.date() .. '"}') end ``` **Branch `feature/structured-logging-health-monitoring` bleibt offen** für späteren Bedarf. --- **Milestone:** v0.1.2 → v0.2.x **Reason:** YAGNI - No current need identified **Lesson:** Low-Tech means "don't build what you don't need"
michael modified the milestone from v0.1.2 - Gateway Basics to v0.2.0 - Sagjan Integration 2025-09-05 20:29:59 +02:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DAW/furt#54
No description provided.