Layer7 API Management

  • 1.  How can I audit the total execution time of a policy?

    Posted Oct 16, 2017 04:57 PM

    We're doing performance testing for some of our APIs and the API Gateway being the middle-man, we were hoping to log the total duration of a policy call in an audit, from the entry point to the exit (return of the response back to the client).

     

    The ${assertion.latency.ms} context variable doesn't seem to do the trick in this situation.

     

    Is there another way we can get this info in an audit log?

     

    We're using CA API Gateway 9.1



  • 2.  Re: How can I audit the total execution time of a policy?
    Best Answer

    Broadcom Employee
    Posted Oct 16, 2017 06:22 PM

    Hello ygirouard_stm ,

    You may just view the Dashboard (policy manager -> View -> Dashboard), the Front End response time is total duration of a service, if you want to exclude the time routing to backend, ie. only the time duration of policy execution, then Front End response time - Back End response time.

     

    Another way is to put ${request.elapsedTime} in audit detail assertion at the end of the policy -- it returns the time (in milliseconds) from receiving the request, to the time when this context variable is referred.

     

    Regards,

    Mark



  • 3.  Re: How can I audit the total execution time of a policy?

    Posted Oct 17, 2017 10:41 AM

    Awesome, that's exactly what I needed. I also added ${httpRouting.latency} to give more details as to which part is taking the longest between policy assertions and routing.



  • 4.  Re: How can I audit the total execution time of a policy?

    Posted Oct 23, 2017 01:42 PM

    Please also keep in mind that the request.elapsedtime counter starts with policy execution and therefore will not include time spent in message queuing due to traffic shaping from your rate limit assertions.

    (If there is a way to capture that time I would really like to know.)