Hi,
We are sending APIM logs to external party (datadog) via Diagnostic Settings in APIM portal.
We want to calculate the latency induced by APIM and differentiate the time taken by -
- api gateway
- backend call
- client time
But, in datadog, we see only 3 values related to time -
- durationMs
- backendtime
- clienttime
The confusion is regarding the value of durationMs because MS resource log schema doc talks about "Total Time" here - https://learn.microsoft.com/en-us/azure/api-management/gateway-log-schema-reference
I am not getting Total Time in my logs and this is actually expected behaviour according to another MS docs line here - https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-use-azure-monitor#view-diagnostic-data-in-azure-monitor
So, my question is how to calculate the api gateway time ? (Please resolved discrepancy in ms docs because it does not explain the meaning of durationMs in apim schema reference logs page)
Another weird observation is :
a lot of times durationMs is less than backendtime with "client time" missing from the logs (assuming its value is so less that it might be equal to 0)
and sometimes both are same with "client time" missing from the logs.
and sometimes durationMs = backendtime + clienttime
and sometime durationMs is more than backendtime but durationMs is less than backendtime + clientime
No logic is fitting here, other than rounding error by MS (if I may assume)
Please guide.