Application Insights
Author: Ronald Fung
Creation Date: 23 May 2023
Next Modified Date: 23 May 2024
A. Introduction
Application Insights is an extension of Azure Monitor and provides Application Performance Monitoring (also known as “APM”) features. APM tools are useful to monitor applications from development, through test, and into production.
B. How is it used at Seagen
In addition to collecting Metrics and application Telemetry data, which describe application activities and health, Application Insights can also be used to collect and store application trace logging data.
The log trace is associated with other telemetry to give a detailed view of the activity. Adding trace logging to existing apps only requires providing a destination for the logs; the logging framework rarely needs to be changed.
Process for Use
Application Insights is enabled through either Auto-Instrumentation (agent) or by adding the Application Insights SDK to your application code. Many languages are supported and the applications could be on Azure, on-premises, or hosted by another cloud.
The Application Insights agent or SDK pre-processes telemetry and metrics before sending the data to Azure where it’s ingested and processed further before being stored in Azure Monitor Logs (Log Analytics). For this reason, an Azure account is required to use Application Insights.
The easiest way to get started consuming Application insights is through the Azure portal and the built-in visual experiences. Advanced users can query the underlying data directly to build custom visualizations through Azure Monitor Dashboards and Workbooks.
Consider starting with the Application Map for a high level view. Use the Search experience to quickly narrow down telemetry and data by type and date-time, or search within data (for example Log Traces) and filter to a given correlated operation of interest.
C. Features
Application Insights provides other features including, but not limited to:
Live Metrics – observe activity from your deployed application in real time with no effect on the host environment
Availability – also known as “Synthetic Transaction Monitoring”, probe your applications external endpoint(s) to test the overall availability and responsiveness over time
GitHub or Azure DevOps integration – create GitHub or Azure DevOps work items in context of Application Insights data
Usage – understand which features are popular with users and how users interact and use your application
Smart Detection – automatic failure and anomaly detection through proactive telemetry analysis
Distributed Tracing - also known as “distributed component correlation”. This feature allows searching for and visualizing an end-to-end flow of a given execution or transaction. The ability to trace activity end-to-end is increasingly important for applications that have been built as distributed components or microservices.
Application Map - allows a high level top-down view of the application architecture and at-a-glance visual references to component health and responsiveness.
Standards and Practices
Application Insights is the feature of Azure Monitor for monitoring your cloud native and hybrid applications.
You must create a resource in Application Insights for each application that you’re going to monitor.
Log data collected by Application Insights is stored in Azure Monitor Logs for a workspace-based application.
Log data for classic applications is stored separately from your Log Analytics workspace.
When you create the application, you must select whether to use classic or workspace based.
A fundamental design decision is whether to use separate or a single application resource for multiple applications.
Separate resources can save costs and prevent mixing data from different applications, but a single resource can simplify your monitoring by keeping all relevant telemetry together.
D. Where implemented
E. How it is tested
Testing Azure Application Insights involves ensuring that the feature is functioning correctly, securely, and meeting the needs of all stakeholders involved in the project. Here are some steps to follow to test Azure Application Insights:
Define the scope and requirements: Define the scope of the project and the requirements of all stakeholders involved in the project. This will help ensure that Azure Application Insights is designed to meet the needs of all stakeholders.
Create test plans: Develop test plans that cover all aspects of Azure Application Insights functionality, including logging, monitoring, alerting, and reporting. The test plans should be designed to meet the needs of the organization, including scalability and resilience.
Conduct unit testing: Test the individual features and modules of Azure Application Insights to ensure that they are functioning correctly. This may involve using tools like PowerShell or Azure CLI for automated testing.
Conduct integration testing: Test Azure Application Insights in an integrated environment to ensure that it works correctly with other systems and applications. This may involve testing Azure Application Insights with different operating systems, browsers, and devices.
Conduct user acceptance testing: Test Azure Application Insights with end-users to ensure that it meets their needs and is easy to use. This may involve conducting surveys, interviews, or focus groups to gather feedback from users.
Automate testing: Automate testing of Azure Application Insights to ensure that it is functioning correctly and meeting the needs of all stakeholders. This may involve using tools like Azure DevOps to set up automated testing pipelines.
Monitor performance: Monitor the performance of Azure Application Insights in production to ensure that it is meeting the needs of all stakeholders. This may involve setting up monitoring tools, such as Azure Monitor, to track usage and identify performance issues.
Address issues: Address any issues that are identified during testing and make necessary changes to ensure that Azure Application Insights is functioning correctly and meeting the needs of all stakeholders.
By following these steps, you can ensure that Azure Application Insights is tested thoroughly and meets the needs of all stakeholders involved in the project. This can help improve the quality of Azure Application Insights and ensure that it functions correctly in a production environment.
F. 2023 Roadmap
Ensure each subscription has an instance of App Insights
G. 2024 Roadmap
Create standard for logging messages and events
H. Known Issues
There are several known issues that can impact Azure Application Insights. Here are some of the most common issues to be aware of:
Data ingestion issues: Data ingestion is a critical component of Azure Application Insights, and issues with data ingestion can cause data loss and impact the accuracy of monitoring data. It is important to ensure that data ingestion is working correctly and that all data is being captured.
Query performance issues: Query performance can be impacted by the volume of data being ingested and the complexity of the queries being run. It is important to ensure that query performance is optimized to meet the needs of your environment.
Integration issues: Integration issues can arise when integrating Azure Application Insights with other systems and applications. It is important to ensure that Azure Application Insights is designed to work seamlessly with other systems and applications to avoid integration issues.
Security issues: Security is a critical concern when it comes to Azure Application Insights. It is important to ensure that all data is encrypted in transit and at rest, and that access to Azure Application Insights is restricted to authorized personnel.
Alerting issues: Alerting is a critical component of Azure Application Insights, and misconfiguration can cause issues with alerting and impact the ability to respond to issues in a timely manner. It is important to ensure that alerting is configured correctly and optimized to meet the needs of your environment.
Capacity issues: Capacity planning is a critical concern when it comes to Azure Application Insights. If the system is not properly sized, it can impact performance and availability, causing issues with monitoring and alerting.
Overall, Azure Application Insights requires careful planning and management to ensure that it is functioning correctly and meeting the needs of all stakeholders involved in the project. By being aware of these known issues and taking steps to address them, you can improve the quality of Azure Application Insights and ensure the success of your project.
[x] Reviewed by Enterprise Architecture
[x] Reviewed by Application Development
[x] Reviewed by Data Architecture