How do i configure Application Insights in my Magento code

Darshan Dalwadi 1 Reputation point
2022-07-04T07:33:10.817+00:00

Hi Team, Can you help us how we can integrate Application Insights in Magento backend code. To track and monitor the code as well as the server.

Thanks,
Darshan Dalwadi

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,661 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,551 Reputation points Moderator
    2022-07-08T04:01:42.327+00:00

    Hi @Darshan Dalwadi ,

    At the moment, Azure Monitor only provides support when using the supported SDKs which excludes PHP. There might be other community-supported Application Insights SDKs available, however, Azure Monitor only provides support when using the supported instrumentation options listed on this page.

    For Servers (VMs, Physical machines) hosting the application, you can use one of Azure Monitor agents as listed in the link below (depending on the Environment, OS etc.):
    Summary of Azure Monitor agents


  2. Rimshavictor 0 Reputation points
    2023-05-19T08:12:18.1233333+00:00
    1. Set up an Application Insights resource in Azure and note the Instrumentation Key.
    2. Install the "Microsoft/application-insights" package using Composer in your Magento backend codebase.
    3. Add the Application Insights configuration to the app/etc/env.php file, including the Instrumentation Key.
    4. Clear the Magento cache and restart your web server.
    5. Perform actions in your Magento backend to track and monitor.
    6. Access the Application Insights resource in the Azure portal to view collected data.

    Following these steps will integrate Application Insights into your Magento backend code for tracking and monitoring purposes.

    0 comments No comments

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.