Skip to main content Get to know Azure Microsoft as Customer Zero View all products (200+) Microsoft Foundry Azure Copilot GitHub Copilot Azure Kubernetes Service (AKS) Azure Cosmos DB Azure Database for PostgreSQL Azure Arc Microsoft Fabric Linux virtual machines in Azure Foundry Models Foundry Agent Service Foundry IQ Foundry Tools Foundry Control Plane Observability in Foundry Control Plane Azure OpenAI in Foundry Models Azure Speech in Foundry Tools Azure Machine Learning View all databases Azure Cosmos DB Azure DocumentDB Azure SQL Azure Database for PostgreSQL Azure Managed Redis Microsoft Fabric Azure Databricks Linux virtual machines in Azure Windows Server on Azure Azure Functions Azure Virtual Machine Scale Sets Azure API Management Azure Container Apps Azure Kubernetes Service (AKS) Azure Kubernetes Fleet Manager Azure Container Registry Azure Red Hat OpenShift Azure Container Instances Azure Container Storage Azure Arc Azure Local Microsoft Defender for Cloud Azure Monitor Microsoft Sentinel Azure Migrate View all solutions (40+) Cloud solutions for small and medium businesses Cloud migration and modernization center Data analytics for AI Azure Databases AI apps and agents Microsoft Marketplace Microsoft Sovereign Cloud AI apps and agents Responsible AI with Azure AI Infrastructure Data analytics for AI Machine learning operations (MLOps) Low-code application development on Azure Integration Services Serverless computing DevOps Migration and modernization center .NET apps migration Databases on Azure Linux on Azure Oracle on Azure SAP on the Microsoft Cloud Adaptive cloud High-performance computing (HPC) Infrastructure as a service (IaaS) Resiliency Azure Essentials Frontier Accelerate for Azure FinOps on Azure Microsoft Marketplace Azure pricing overview Create an Azure account Free Azure services Flexible purchase options Pricing calculator FinOps on Azure Maximize ROI from AI Azure savings plans Azure reservations Azure Hybrid Benefit Virtual Machines Azure SQL Microsoft Foundry Microsoft Fabric Azure Kubernetes Service (AKS) Microsoft Defender for Cloud View more Software Development Companies Microsoft Marketplace Find a partner Resources for Azure partners Get started with Azure Customer stories Analyst reports, white papers, and e-books Videos Learn more about cloud computing Documentation Explore Azure portal Developer resources Quickstart templates Resources for startups Developer community Students Azure for partners Blog Events and Webinars Learn Support Contact Sales Get started with Azure Sign in

When you publish a Java web application, you want a clear view of what users are doing with it and how it’s performing. Your most effective plan for future work comes from a deep understanding of how people use what you’ve already provided: which features they like, what patterns they follow, and what they find difficult. You also want to know that your application is performing well – how quickly it responds, how performance varies under load. If performance drops or exceptions are thrown, you’d like to be notified quickly, and to diagnose the issue you’ll want powerful filter and search facilities to investigate the event traces.

Visual Studio Application Insights is a service that gives you all of this, with powerful usage analytics, performance monitoring and diagnostic analysis. To use it, you add an SDK to your application, which sends telemetry to the Application Insights web portal. There, you slice and dice your metrics and events and configure the alerts you need.

You can send telemetry from the server, from web pages, and from several types of client applications, such as Windows Phone and Windows Store Apps. The API is uniform across the different platforms. There’s also a web test service that pings your website at regular intervals to make sure it’s up and responding well.

This week at EclipseCon, we’re pleased to introduce the Application Insights SDK for Java. Here’s a typical plan for setting up Application Insights for your Java web application. Please note, you don’t have to adhere to this order:

Instrumentation you add

Insights you receive
Server insights: Add the SDK to your Java web applicationServer-side metrics of response times, volumes of requests, numbers of users. Alerts on bad performance.
Client insights: Add the Application Insights script to your web pagesPage views, user and session counts, return rates and browser types.
Availability web testsChart response times, get alerts on outages.
Add custom telemetry – client-side, server-side, or bothTrack how your application is being used by sending custom events, metrics and exceptions.
Add the Application Insights logging appender to your logging frameworkExplore your application logs directly in the Application Insights portal with powerful slice and dice capabilities.

 

What insights can I get for my Java application?

We’re constantly expanding the set of insights you can get for your java web app, to help you gain a complete 360° view of your application’s availability, performance and usage. Here’s what is available today:

Monitor how your app performs – Make sure your application is performing well, and find out quickly about any failures. This information is retrieved automatically when adding the SDK to your web project.

graphical user interface, text, application

Analyze usage patterns in your application – Understand adoption, interaction and engagement trends. Insert a JavaScript snippet in your web pages to find out what pages draw most attention, what the profile of your users is, and where they spend most of their time in your app.

chart

Track custom event, metric and exception telemetry – Using the telemetry API, insert a few lines of code in your application to find out what users are doing with it, or to help diagnose issues.

A screenshot of a graph

Explore your trace logs in the Application Insights portal – have your trace logs sent automatically to Application Insights where you can explore and search on them. Just add the Application Insights appender to your logging framework’s configuration (supported for Log4J and Logback).

graphical user interface, application

Monitor the health of your application – After you’ve deployed your web application, you can set up web tests to monitor its availability and responsiveness. Application Insights will send web requests at regular intervals from points around the world, and can alert you if your application responds slowly or not at all.

a close up of a screen

Adding the Application Insights SDK for Java to your project

If you develop your project using Eclipse, adding the Application Insights SDK for Java to your dynamic web project is easy. All you need to do is install the newest version of the Azure Toolkit for Eclipse (By Microsoft Open Technologies) which will be available during the week of EclipseCon, right-click your project, select “Configure Application Insights”, and provide your instrumentation key. Step by step guide on how to do this.

graphical user interface, text, application, email

There are a number of additional ways to add the SDK to your Java project: using Maven, Gradle, or manually. This article covers all these options in detail.

Can I use Visual Studio Online to plan, code, build, test and deploy my Java applications?

Absolutely, Visual Studio Online provides cloud-hosted tools for your Java teams that complement your favorite Java tools and services such as Eclipse and Jenkins, respectively.

What’s next?

Now that you’ve added the SDK to your project, you can go ahead and add more instrumentation to gain a variety of insights about your Java application.

Here are some links to get you started:

What do you think?

We’d love to get your feedback. How can we make this better? Please let us know!

WE ARE MICROSOFT

Explore Microsoft Foundry

The future of AI starts here. Envision your next great AI app with the latest technologies. Get started with Azure.