Kong Plugin Error Tracing

Is there a way to figure out the errors related to kong or their plugins?
So let’s say my request goes through kong and its multiple plugins and get failed, it returns 5xx so how will I differentiate whether the request is failed at the plugin side or the error is returned via upstream service, do we have any metrics exposed for the same.

Also do we have a way to add the field like actions_executed which will log the last state like AWS ALB logs showing the last plugin executed.

Have you watch log in error.log file? Or you can post more image about your error here so everyone can understand you situation

I have got issues in the past with Kong plugins. Make sure you set a reasonable log_level, like debug or notice.
Not all the plugins produce good loglines, even in debug mode.
Another thing that works is to have calls to mockbin, instead of the actual upstream service for debugging, to see the effects of all the plugins involved in transforming my call. When I’m satisfied with the result I switch to the proper upstream, and work my way on the response pipeline.