0
votes

I would like to log the request and response bodies of my API calls in Azure API Management for debugging purpose.

To do that I have created a Log Analytics workspace and configured the diagnostic settings to store the logs in it. But when I check the logs in Log Analytics tool (Logs of the last 100 calls), I see my API calls with status code, subscription key, etc but the body columns are always empty.

I tried to enable the body request logging in the API Azure Monitor advanced settings but it doesn't change a thing, still empty bodies and headers.

Do I have forgotten something or is there a notion of Azure Monitor that I do not understand?

1
Microsoft deployed this feature 2 weeks ago, so now I have the request and response bodies in my logs when I activate body logging in the Azure Monitor tab of the API setting 👍 - Devid

1 Answers

1
votes

I think there isn't anything you forgot to configure the monitor for APIM, I also test it in my side and also can't see the requestbody and responsebody column in logs.

Here find an answer from MSFT about this problem for your reference, I think that's the official answer.

enter image description here