Conveyor

Logs and audit

The problem

A home equity operation goes through many hands (partner, analysis, legal, payment) and every stage requires documents and checks. Without a single place, operations stalled and nobody knew which stage they were in or what was missing to move on.

The front-end mints the traceparent, every service logs JSON with the traceId to stdout and Loki, Grafana finds the whole request across services, and business events go to the logs.audit table.

Decisions and why

Shared logging library
libs/logger sets the format, MDC and AuditLogger: no service copies it.
Bracketed fields
[UserId], [OperationId]: Loki can filter by field name.
Audit is data, not a log
It lives in PostgreSQL with who, what, target, ip and user agent.
requestresponse
Pick a scenario above to watch the message travel through the architecture.

What it looks like

Replica of the pipeline board with fictional data (internal system)
esteira.evilrabbit.com.br/lines/triage
EsteiraPTGM
Triagem
Conferência de dados2
Marina SouzaGMR$ 480 mil 1 d
Paulo HenriqueR$ 1,2 mi hoje
Combate à fraude1
Ricardo AlvesAPR$ 750 mil 4 d
Validação dos documentos2
Carla PradoGMR$ 610 mil 2 6 d
João ReisR$ 295 mil 2 d
Aguardando aprovação0
Nada aqui