How can I do live tracing of API call without instrumenting with trace auth headers?

Martin Kallukalam 170 Reputation points
2024-06-14T00:07:44.2533333+00:00

Is there a way to live trace an api call without instrumenting the call with Apim-Debug-Authorization headers? I understand we can trace the call from a client utility such as postman/curl by passing the Apim-Debug-Authorization. However that is not going to be helpful when tracing a production app making an api call. Is there a way to trace api calls without really having to instrument the call with any apim debug auth header

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 23,256 Reputation points
    2024-06-14T06:24:45.9033333+00:00

    @Martin Kallukalam Thanks for reaching out. You can use Azure Monitor which provides a centralized logging and monitoring solution for Azure resources, including APIM. You can configure Azure Monitor to collect logs and metrics from APIM, and then use the Azure Monitor Logs feature to query and analyze the logs in real-time. This allows you to view detailed information about API requests and responses, including headers, body, and status codes, without instrumenting the call with Apim-Debug-Authorization headers.

    Please refer: https://video2.skills-academy.com/en-us/azure/api-management/api-management-howto-use-azure-monitor#resource-logs

    Another option is to integrate APIM service with Application Insights for generating diagnostic log data.

    Integration of APIM with Application Insights - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-app-insights

    It's important to note that each of these options requires some setup and configuration and may have associated costs. However, they provide powerful tools for live tracing API calls in APIM.

    Refer: https://techcommunity.microsoft.com/t5/azure-paas-blog/troubleshooting-4xx-and-5xx-errors-with-azure-apim-services/ba-p/2115752

    do let me know incase of further queries, I would be happy to assist you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful