Add detailed access logging and Prometheus metrics
Some checks failed
Deploy Stacks / deploy-prod (push) Failing after 1s
Deploy Stacks / deploy-dev (push) Has been cancelled

- accessLog: field filtering to drop sensitive headers (Authorization)
  while keeping useful ones (User-Agent, Content-Type, Referer)
- metrics: Prometheus endpoint with latency buckets (0.1, 0.3, 1.2, 5.0s)

Aligned with core's observability config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 10:17:19 -05:00
parent c5e416d31c
commit d6a3d9a3f6

View File

@@ -47,3 +47,22 @@ log:
accessLog: accessLog:
filePath: /var/log/traefik_access.log filePath: /var/log/traefik_access.log
format: json format: json
fields:
defaultMode: keep
names:
clientUsername: drop
headers:
defaultMode: keep
names:
User-Agent: keep
Authorization: drop
Content-Type: keep
Referer: keep
metrics:
prometheus:
buckets:
- 0.1
- 0.3
- 1.2
- 5.0