That's an useful feature, what's more, can we also record the error reason while communicating to upstream, like connection refused, connection timed out and so on.
Best regards Chao Zhang https://github.com/tokers On Tue, Apr 6, 2021 at 11:23 AM fukiki <[email protected]> wrote: > > 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
