Correlation and tracing
There is one id per user request.
- The client may send
X-Request-Id. Kong accepts it when it matches[A-Za-z0-9._:-]{1,64}, otherwise Kong generates one. - Kong echoes the header on the response.
- The service copies it to MDC
traceId. ApiErrorResponse.traceIdreturns it to the client.- Outbox insert copies it to
trace_id. The relay puts it onIntegrationEventEnvelope.traceId. - The consumer stores it on
inbox_messages.trace_idand logs it again.
A failed push ten seconds later is still findable from the id the app showed the user.
How to search
Grafana dashboard Trace Explorer (splick-trace-explorer) and Logs (splick-logs). LogQL shape:
{service="auth-service"} | json | traceId="<id>"
Replace the service label with the process you mean. If the id appears at Kong and not in the service, the upstream never logged. If it appears in the service and not in the consumer, the outbox row was not relayed or the consumer group is stuck.
This is correlation, not a full OpenTelemetry trace tree. Spans are a later addition. Do not invent a second header.