Allow backend call details in "context" interface
It would be very usefull to have access to backend call details via a new context "backend" interface so we could have access to "status code", backend url, call duration...
In fact all that could be usefull to analyse "backend calls" in outbound policies.
Thank you for the suggestion, Bruno! Backend URL and status code are already available via context’s Request and Response members. It would help if you can share what sort of analyses you would like to perform in outbound policies.
Hi I made further tests and in fact I ws wrong about URL and return code. If you get Request.URL just after backend call you get the info even if backend url was changed before the call. I don't know why I figured it was a static info (the service url configured).
The same for response.ReturnCode I can get it before it is changed by a policy.
So the improve could be limited to have only backend call duration (but I could calculate it via policy too).
So I suggest you archive this request. Thanks again for your interest.
Hi, thanks for your interest. In APIM native gateway logs you have a lot of interesting informations about backend call like backendMethod, backendUrl, backendResponseCode, backendTime, backendProtocol. You're right there is some information in Request or Response, like service URL or responce code. But the response code or backend url can be manipulated by process (by example a policy can change backend url, a backend response call can be reinterpreted ...). In this case I'm not sure that the context will provide the right information. The return code seems to be the final one (the one finally returned by APIM). In gateway logs, the informations are clearly distinctive and richer. I would be very interested to have this clear level of information in policies (for my custom logging for example).