0

We made a call to our APIM endpoint from postman. Somehow the request was failing and was giving 500 error along with an activityid in response.

Actually what was happening when we tested from APIM test console was that the request was timing out and never reaching the backend via application gateway.

We could NOT find any logs in application insights using the activity id received in postman. Can any confirm who is adding activity id in the response and why we could not find any logs in application insights?

2 Answers2

0

Activity Id is the Guid Id Property is helpful for diagnosing the server errors on API Requests Submission.

enter image description here

Activity Id is logged when any internal or external server errors in the Htpt Request as shown in above.

There are many ways to debug/check the status and the reasons of API Management Instance API's Request/Response Failures.

  • Make Sure your APIM Instance is integrated with the application insights instance.
  • From the APIM Portal > Logs or Application Insights > Logs:

enter image description here

  • From the Azure monitory, you can find the Activity logs for specific APIM Instance and their status details:

enter image description here

  • Also, Check the Settings on the APIM Instance (Azure Portal) > APIs > Select your API > Settings > Web Service URL field and check more info on debugging the Azure APIM 500 Internal Server Error on SO Issue by @Jason.
  • I am aware of using APIM test console and using application insights for searching for API failures. But my query was more on time out issues. Suppose there is an issue at gateway and the request is timing out at APIM itself, we were unable to find any logs in application insights. – Mahesh Gali Mar 30 '23 at 11:00
  • Have you checked on the Azure Monitor Side, there every activity will be logged. –  Mar 30 '23 at 11:03
0

How to extract Activity Id information

  1. Open Azure API Management service

  2. Navigate to Monitor > Logs Under logs editor. execute below query.

        ApiManagementGatewayLogs
        | where CorrelationId=='9a54gns8-3j7s-jh5g-19jg-15magd84kand'