Class LoggedMdcKeys

java.lang.Object
com.fayupable.logged.spring.aspect.LoggedMdcKeys

public final class LoggedMdcKeys extends Object
The MDC key names this library writes to while a @Logged method is executing.

These keys are public and stable: a consuming application references them directly in its own logging configuration (a Logback pattern layout, a JSON encoder's field mappings, and so on) to have every log statement made during a @Logged call — not just the summary line this library itself emits — automatically carry the call's trace id, depth, class, and method name. Without this, correlating an application's own log.info(...) calls with a specific invocation in a structured logging backend (Loki, ELK) requires manually threading that information through every log statement by hand.

Every key is prefixed with logged. specifically to avoid colliding with an MDC key a consuming application, or another library, already uses for its own purposes (a bare traceId key, for example, is common enough that a collision would be likely without this prefix).