Adds langfuseMiddleware in internal/shared so every daemon's shared.Run gets free production-traffic trace visibility when LANGFUSE_URL + LANGFUSE_PUBLIC_KEY + LANGFUSE_SECRET_KEY are set. Same env names + file shape as the multi_coord_stress driver, so operators ship one /etc/lakehouse/langfuse.env across the deploy. Wiring is auth-gated: middleware runs INSIDE the RequireAuth group, so 401s from credential-stuffing don't pollute traces. /health is exempt so LB probes don't either. Missing env vars → nil client → middleware is a passthrough no-op (fail-open per ADR-005 5.1). Bundled deploy: - langfuse.env.example template (mode 0640, root:lakehouse) - 11 systemd units gain `EnvironmentFile=-/etc/lakehouse/langfuse.env` (leading - so missing file = OK) - REPLICATION.md bootstrap section documents setup Tests (4): nil passthrough, /health bypass, real-request emission, status-writer wrapping. All green. STATE_OF_PLAY OPEN list: 5 rows → 4 rows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
870 B
Desktop File
33 lines
870 B
Desktop File
[Unit]
|
|
Description=Lakehouse-Go pathwayd — Mem0-style versioned trace store
|
|
Documentation=https://git.agentview.dev/profit/golangLAKEHOUSE
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=lakehouse
|
|
Group=lakehouse
|
|
WorkingDirectory=/var/lib/lakehouse
|
|
ExecStart=/usr/local/bin/lakehouse/pathwayd -config /etc/lakehouse/lakehouse.toml
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
EnvironmentFile=-/etc/lakehouse/auth.env
|
|
EnvironmentFile=-/etc/lakehouse/langfuse.env
|
|
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
# pathwayd's [pathwayd].persist_path defaults under /var/lib/lakehouse/pathway/
|
|
# in production for JSONL append-only persistence.
|
|
ReadWritePaths=/var/lib/lakehouse /var/log/lakehouse
|
|
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=lakehouse-pathwayd
|
|
|
|
[Install]
|
|
WantedBy=lakehouse-go.target
|