Azure diagnostics table is not showing under Azure APIM logs. What can be done for showing it?

Bhargav Pasarla 120 Reputation points
2023-07-07T08:44:19.52+00:00

Azure Diagnostic logs are not showing in the resource specific logs. I need help to be able to see Azure Diagnostic table and data to enter inside it for the requests.

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

Accepted answer
  1. navba-MSFT 27,185 Reputation points Microsoft Employee
    2023-07-11T09:26:15.68+00:00

    @Bhargav Pasarla Thanks for getting back. Please find below the answers to your questions inline.

    1. In API Management If we setup a diagnostic setting is it not enough to send logs to LogAnalytics workspace? on top of it in all apis settings do we need to setup something?
      Answer: To get the APIM resource Logs, if you enable the Diagnostic Setting at the APIM instance level (as shown below)--> and send the logs to Log Analytics Workspace it should be enough.
      User's image

    You don't need to enable the Monitoring logs again at the API level. Because the below setting is same as above. By default, when you create a diagnostic setting to enable collection of resource logs, logging is enabled for all APIs, with default settings. You can adjust the logging settings for all APIs, or override them for individual APIs.
    User's image

    2.What is the difference between Application Insights and Azure Monitor in the above image?
    Answer: Application insights will log the below details for your APIM:
    User's image

    You can also emit custom metrics to Application Insights from your API Management instance. API Management emits custom metrics using the emit-metric policy. This tutorial talks about enabling and analyzing the Application Insights logs.

    Azure Monitor logs will log the Audit Logs, ApiManagementGatewayLogs, Logs related to the WebSocketConnections and also Metrics. These logs are more detailed. Once these logs are sent to the LogAnalytics workspace, you can query them as shown here:

    User's image

    3.When we try to enable it Application Insight will ask to specify a logger but in Azure Monitor it wont ask for any logger, where will it go for Azure Monitor? Can we create a custom logger for Azure monitor option if we want?
    Answer: You have multiple options available in Azure Monitor to send (or log) the data to. See below:

    User's image

    **
    **
    Description about each of the destination options:
    User's image

    **
    **
    Hope this helps.

    If you have any follow-up queries, please let me know. I would be happy to help.**
    **
    Sharing some useful links here if that helps:
    https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-use-azure-monitor#view-diagnostic-data-in-azure-monitor
    https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=portal
    https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-app-insights?WT.mc_id=Portal-fx

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.