Use elapsed time for inbound/backend/outbound from trace as variables.

AmosBurton 1 Reputation point
2020-06-04T08:31:10.317+00:00

Hi,

In Azure APIM when doing trace you notice that there are a kind of trace json structure. Is it possible to get hand of this trace in the policy editor? Our goal is to log how much time each request take so we have to add inboud/backend/outbound elapsed time together and then add it together.

9056-elapsed.png

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,896 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,941 Reputation points
    2020-07-10T15:01:14.363+00:00

    Hi @AmosBurton-5952

    Unfortunately, there is no way you can get the Ocp-Apim-Trace content in the policy editor.
    These traces are generated as the blob URL only after the response. If you want to perform any business logic then you need to access these blob and write your own logic to process/operate them.