Skip to main content

Structured logging

Production logs are JSON. shared-logging adds HttpAccessLogFilter, StructuredLog, and UseCaseObservationAspect.

Fields you can rely on:

FieldMeaning
eventWhat happened (http.access, a use-case name, a job name)
directionInbound or outbound
outcomeSuccess or failure
traceIdCorrelation id
userIdPresent when the JWT was valid. Absent on public routes
serviceProcess name
httpStatusStatus code
durationMsElapsed time

Log levels: info for access and successful use cases that matter, warn for rejected auth and retries, error for failed jobs and unhandled exceptions. Debug is off in production.

Never log: passwords, OTP, refresh tokens, presigned query strings, email provider API keys, APNs private keys, raw payment identifiers.

Promtail ships Docker logs for containers named splick-* to Loki. Kong access logs are included and labeled with traceId from X-Request-Id.