Great idea ~ I think recording all non-2xx requests and provide a similar header of x-upstream-status is better.
fukiki <[email protected]> 于2021年4月6日周二 上午11:23写道: > Hi, All: > > I am sending the email for further discussion: Distinguish the source > (upstream or apisix) of all the status code, under the control of a debug > switch. > > There was a discussion earlier about 'How to distinguish the source of > these response status codes', and the conclusion is that: Adding > 'X-APISIX-Upstream-Status' in the response header of the request, which can > effectively identify the source of the 5xx status code. > > Actually, only distinguishing the source of the 5xx status code is not > enough. In some scenarios, the requirement may need to distinguish the > source of status codes 4xx/3xx, which can quickly help us determine the > problem. > > For example, there was a request returned an error: 404 NOT FOUND. Without > distinguishing the source of the status code, it is difficult to determine > the reason of the problem. > > > I have submitted the issue on gihub: issue 3963( > https://github.com/apache/apisix/issues/3963), and had some discussions, > the final solution is: > 'X-APISIX-Upstream-Status' is already supported, base on this, we can > distinguish the source of all the status code, under the control of a debug > switch. > > We need more suggestions from the community, and looking forward to your > reply. > > > Best regards, > fukiki
