Anyone know how to get insight into apigateway lat...
# help
g
Anyone know how to get insight into apigateway latency? The default cloudwatch logs setup for the httpApi show responseLatency as 0 when the authorizer fails, and the authorizer obviously took time to process and I want to know how long a request took from apigw -> authorizer -> integration -> response.
s
have you tried X-Ray yet? to the API Gateway as well as all Lambda functions. https://docs.aws.amazon.com/xray/latest/devguide/xray-services-apigateway.html I wouldn’t necessarily recommend running X-Ray in production ,as X-Ray itself tends to add some latency, I’ve noticed
g
I have not tried xray I have it turned off currently, but ideally I want to set this up as monitoring for a production setting. Currently routes showing a 0ms time for response throws off what the actual user experience is.
It seems it shows responseLatency 0 whenever the authorizer does not get called because theres no Authorization header set, but it still takes time for the response because of API gateway which I would like to know. Whenever I do have an auth header set that is invalid it shows a response time of 433ms when actual response time was 704ms. Though I am not entirely sure how it gets the responseLatency value because the authorizer took 283ms (173ms cold start + 110ms duration) and since the authorization was invalid it wouldnt call my lambda.
f
How is 704ms observed? From the network tab?
g
Yeah from the network tab