[dreamwidth/dreamwidth] 00b8f8: Add JSON access log middleware for Grafana Loki
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: 00b8f85a98e039eaaf2046ccb2bbc7e1ff07d60e https://github.com/dreamwidth/dreamwidth/commit/00b8f85a98e039eaaf2046ccb2bbc7e1ff07d60e Author: Mark Smith mark@dreamwidth.org Date: 2026-04-19 (Sun, 19 Apr 2026)
Changed paths: M app.psgi M bin/starman A cgi-bin/Plack/Middleware/DW/AccessLog.pm
Log Message:
Add JSON access log middleware for Grafana Loki
Replace Starman's default Apache Combined access log with a DW::AccessLog
middleware that emits one JSON object per line to psgi.errors. Fields include
method, path, status, bytes, duration_ms, host, remote_ip, and user_agent —
all natively parseable by Loki's | json pipeline for dashboards.
Use --no-default-middleware to suppress Plack's built-in AccessLog, and enable ContentLength explicitly in app.psgi to preserve that behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
To unsubscribe from these emails, change your notification settings at https://github.com/dreamwidth/dreamwidth/settings/notifications
