|
| 1 | +--- |
| 2 | +title: Monitor applications running on Azure Functions with Application Insights - Azure Monitor | Microsoft Docs |
| 3 | +description: Azure Monitor seamlessly integrates with your application running on Azure Functions, and allows you to monitor the performance and spot the problems with your apps in no time. |
| 4 | +ms.topic: conceptual |
| 5 | +author: MS-jgol |
| 6 | +ms.author: jgol |
| 7 | +ms.date: 05/20/2020 |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +# Monitoring Azure Functions with Azure Monitor Application Insights |
| 12 | + |
| 13 | +[Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-overview) offers built-in integration with Azure Application Insights to monitor functions. |
| 14 | + |
| 15 | +Application Insights collects log, performance, and error data. It automatically detects performance anomalies and includes powerful analytics tools to help you diagnose issues and to understand how your functions are used. It's designed to help you continuously improve performance and usability. You can even use Application Insights during local function app project development. |
| 16 | + |
| 17 | +The required Application Insights instrumentation is built into Azure Functions. The only thing you need is a valid instrumentation key to connect your function app to an Application Insights resource. The instrumentation key should be added to your application settings when your function app resource is created in Azure. If your function app doesn't already have this key, you can set it manually. For more information read more about [Monitoring Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-monitoring?tabs=cmd). |
| 18 | + |
| 19 | +## Azure Functions and distributed tracing for Java applications (public preview) |
| 20 | + |
| 21 | + |
| 22 | +> [!IMPORTANT] |
| 23 | +> This feature is currently in public preview for Java Azure Functions. |
| 24 | +> For Consumption plan it has a cold start implication of 8-9 seconds. |
| 25 | +
|
| 26 | +If your applications are written in Java you can view richer data from your function applications, including, requests, dependencies, logs and metrics. The additional data also lets you see and diagnose end-to-end transactions and see the application map, which aggregates many transactions to show a topological view of how the systems interact, and what the average performance and error rates are. |
| 27 | + |
| 28 | +The end-to-end diagnostics and the application map provide visibility into one single transaction/request. This is a helpful tool for finding the root cause of reliability issues and performance bottlenecks on a per request basis. |
| 29 | + |
| 30 | +### How to enable distributed tracing for Java Function apps? |
| 31 | + |
| 32 | +Navigate to the functions app Overview blade, go to configurations. Under Application Settings click "+ New application setting". Add the following two application settings with below values, then click Save on the upper left. DONE! |
| 33 | + |
| 34 | +``` |
| 35 | +XDT_MicrosoftApplicationInsights_Java -> 1 |
| 36 | +ApplicationInsightsAgent_EXTENSION_VERSION -> ~2 |
| 37 | +``` |
| 38 | + |
| 39 | +## Next Steps |
| 40 | + |
| 41 | +* Read more instructions and information about monitoring [Azure Functions]([Monitoring Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-monitoring).) |
| 42 | +* Get an overview of [Distributed Tracing](https://docs.microsoft.com/azure/azure-monitor/app/distributed-tracing) |
| 43 | +* See what [Application Map](https://docs.microsoft.com/azure/azure-monitor/app/app-map?tabs=net) can do for your business |
| 44 | +* Read about [requests and dependencies for Java apps](https://docs.microsoft.com/azure/azure-monitor/app/java-in-process-agent) |
| 45 | +* Learn more about [Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/overview) and [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview) |
0 commit comments