Observability

End-to-end traceId

One request, five entry points, the same traceId.

Where it comes from

The trace id is written into MDC by Micrometer Tracing (OTel bridge) and is the only source of trace ids in the whole framework. Do not build your own and do not add a custom trace header.

How to read it

MiniMaoContextHolder.getTraceId()
  • The response body carries a traceId field directly; the front end reads it from there, with no custom response header.
  • Cross-service propagation uses the standard traceparent only.

Five entry points, one value

Entry pointNotes
HTTP requestcreated by the trace entry filter
Scheduled taskcontinued at the task entry point
Message consumptioncontinued at the consumption entry point
Thread-pool taskuse the framework executor; context propagates automatically
Async callcontext and MDC propagate together and are restored afterwards

Warning: new Thread and self-built thread pools are banned: context cannot cross them and the traceId breaks.

How to read an empty value

[] in the log means the line is not inside any request (startup, first servlet initialization, non-HTTP entry point), not that the chain was lost. If access logs appear "sometimes missing", check this first.

Last updated 2026-10-09Edit this page →