How to get API Management logs for WebSockets - ApiManagementWebSocketConnectionLogs?

OldMachineShop 0 Reputation points
2025-01-31T14:49:09.26+00:00

We have a client that has been calling an API through APIM for over a year. This week they started getting handshake errors for most, but not all, of their requests to this endpoint. We have not made any changes on our end, and if we make calls from Postman they are all successful. The client cannot provide us any more details other than the error. We would like to view the WebSocket logs so we can troubleshoot why they are having this issue, but cannot get APIM to log WebSockets - specifically to the ApiManagementWebSocketConnectionLogs table.

  1. We have enabled this in the APIM Diagnostic settings:

User's image

  1. We have also tried enabling all categories and Metrics.

User's image

  1. We have enabled verbose logging for all APIs:

User's image

For all of these changes, we are able to see the APIM logs for successful requests, but we do not see any errors logged when the client receives the handshake error. We have queried the following tables:

  • AzureDiagnostics - We see the successful requests, but not the handshake errors.
  • ApiManagementGatewayLogs - We see the successful requests, but not the handshake errors.
  • ApiManagementWebSocketConnectionLogs - There is no data in this table. We believe this is where we should be able to see the handshake requests/responses.

Can someone help us understand what we need to do to see the WebSocket logs, or tell us another way to see APIM handshake logs? Thank you.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,287 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.