Best practice for 500 errors
- Enable
error.log(debug) in Kong. - Use
file-logorhttp-logplugin to capture structured traffic. - Use
correlation-idplugin to align Kong + upstream logs. - Always check upstream service logs — a 500 originates there, not in Kong.
Kong automatically adds X-Kong-Request-ID (if enabled).
- Add plugin:
correlation-id - Configure a header (e.g.
X-Request-ID) so you can trace across Kong logs, upstream app logs, and client logs.