Skip to content

Instantly share code, notes, and snippets.

View allending's full-sized avatar

Allen Ding allending

View GitHub Profile

Keybase proof

I hereby claim:

  • I am allending on github.
  • I am allending (https://keybase.io/allending) on keybase.
  • I have a public key whose fingerprint is 7334 3A6D 44AB B998 6B5D 60C3 6A73 A638 6D54 0B5E

To claim this, I am signing this object:

# Logging Best Practices for Distributed Transactional Systems
This guide outlines 12 best practices for logging in distributed systems that handle transactional processing, with examples in Java using SLF4J.
## Table of Contents
- [1. Include a Unique Transaction / Correlation ID](#1-include-a-unique-transaction--correlation-id)
- [2. Log at Key Lifecycle Points](#2-log-at-key-lifecycle-points)
- [3. Use Structured Logging (e.g. JSON)](#3-use-structured-logging-(eg-json))
- [4. Capture and Log Errors with Full Stack Traces](#4-capture-and-log-errors-with-full-stack-traces)
- [5. Consistent Format and Naming for Message Templates](#5-consistent-format-and-naming-for-message-templates)