2

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?

Devidb
  • 67
  • 8
  • 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 – Devidb May 06 '21 at 09:28

1 Answers1

3

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

Hury Shen
  • 14,948
  • 1
  • 9
  • 18
  • 1
    Thank you @hury-shen, I have searched on github but not the right repo apparently. I hope Microsoft will implement this feature soon. – Devidb Apr 21 '21 at 07:19