{"id":232606,"date":"2026-01-20T14:03:46","date_gmt":"2026-01-20T22:03:46","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=232606"},"modified":"2026-01-20T14:03:46","modified_gmt":"2026-01-20T22:03:46","slug":"introducing-azure-performance-diagnostics-tool-for-java-automated-java-performance-analysis-in-kubernetes-via-azure-sre-agent","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/introducing-azure-performance-diagnostics-tool-for-java-automated-java-performance-analysis-in-kubernetes-via-azure-sre-agent\/","title":{"rendered":"Introducing Azure Performance Diagnostics Tool for Java: Automated Java Performance Analysis in Kubernetes via Azure SRE Agent"},"content":{"rendered":"<p>We&#8217;re excited to announce that the Azure Performance Diagnostics Tool for Java is now available for preview as part of\nthe <a href=\"https:\/\/azure.microsoft.com\/en-us\/products\/sre-agent\/\">Azure SRE Agent<\/a> platform, bringing intelligent,\nautomated Java performance diagnoses. Currently supporting Java workloads deployed to Azure Kubernetes Service (AKS) clusters.<\/p>\n<h2>What is Azure Performance Diagnostics Tool for Java via Azure SRE Agent?<\/h2>\n<p>The Azure Performance Diagnostics Tool for Java is a powerful new capability within Azure SRE Agent, an AI-powered service that automatically responds to site reliability issues. This feature enables development and operations teams to monitor, analyze, and troubleshoot Java\nVirtual Machine (JVM) performance issues with unprecedented ease.<\/p>\n<p>Azure Performance Diagnostics Tool for Java can identify and diagnose common JVM problems, including:<\/p>\n<ul>\n<li>Garbage collection inefficiencies and pauses<\/li>\n<li>CPU resource utilization issues (both under- and over-utilization)<\/li>\n<li>Excessive I\/O operations impacting application performance<\/li>\n<li>Thread contention<\/li>\n<\/ul>\n<p>An example of a report highlighting a garbage collection issue would be as follows:\n<a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-scaled.webp\"><img decoding=\"async\" class=\"alignnone wp-image-232612 size-large\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-1024x683.webp\" alt=\"A diagnosis from SRE agent showing a garbage collection issue\" width=\"1024\" height=\"683\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-1024x683.webp 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-300x200.webp 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-768x512.webp 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-1536x1024.webp 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/analysis-2048x1365.webp 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>How Does It Work?<\/h2>\n<p>When Azure SRE Agent is tasked with solving a performance issue by the customer and it suspects that a JVM related issue is the cause, the agent immediately initiates a comprehensive diagnostic report. This allows your team to understand the root cause of this performance issue.<\/p>\n<p>Teams can also manually request diagnostics through the Azure SRE Agent chat interface. Simply ask for a performance analysis\nof any Java service; you can even build your own Sub-Agent and integrate the AKS performance functions as part of that Sub-Agent. You can then directly ask your agent to perform Java diagnoses:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis.webp\"><img decoding=\"async\" class=\"alignnone wp-image-232613 size-large\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-1024x404.webp\" alt=\"A user requesting an analysis from the sub-agent\" width=\"1024\" height=\"404\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-1024x404.webp 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-300x118.webp 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-768x303.webp 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-1536x606.webp 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/requestAnalysis-2048x808.webp 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Take a look at it in action in the video below.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"\/\/www.youtube.com\/embed\/0RnICCVBYxc?si=0m5iBtLP7xSp5QA_\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3>The Java Performance Diagnostic Process<\/h3>\n<p>When Azure SRE Agent suspects a performance issue (or is manually invoked to perform a Java performance investigation in your container), it:<\/p>\n<ol type=\"1\">\n<li>Spins up an ephemeral container within your pod<\/li>\n<li>Attaches to the target Java container without disrupting service<\/li>\n<li>Collects detailed performance telemetry using Java Flight Recorder (JFR)<\/li>\n<li>Analyzes the data and generates actionable insights<\/li>\n<li>Closes down the ephemeral container once the analysis is complete<\/li>\n<\/ol>\n<p>This approach ensures zero downtime while providing deep visibility into JVM behaviour.<\/p>\n<p><strong>NOTE<\/strong>: For auditability reasons the Kubernetes API retains visibility of terminated ephemeral containers. As a result when looking at a pod for instance using <code>kubectl describe pods<\/code> the ephemeral containers will be visible, to prevent excessively generating noise within your environment, we have limited the pod to having run 5 diagnostic containers.<\/p>\n<h2>Getting Started<\/h2>\n<p>Setting up JVM Diagnostics is straightforward. Here are the requirements:<\/p>\n<ul>\n<li><b>Java applications deployed in AKS<\/b> &#8211; Your Java services must be running within an Azure Kubernetes Service cluster<\/li>\n<li><b>Azure SRE Agent configuration<\/b> &#8211; Ensure your <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/sre-agent\/usage#create-an-agent\" target=\"_blank\" rel=\"noopener\">Azure SRE Agent service is created<\/a> and has appropriate access to your AKS cluster<\/li>\n<li><b>Pod annotation<\/b> &#8211; Add the <code>languageStack=java<\/code> annotation to your pods to enable Azure Performance Diagnostics Tool for Java<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: At time of writing the Java profiling feature is in the Early access features, to enable early access, within the SRE Agent UI, browse to <code>Settings<\/code>, <code>Basics<\/code>, and select\u00a0 <code>Early access to features<\/code>. The feature will progress to main line in the coming month.<\/p>\n<p>Adding the required annotation is as simple as updating your pod specification:<\/p>\n<pre><code>\r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: your-java-app\r\n  annotations:\r\n    languageStack: java\r\nspec:\r\n  containers:\r\n    - name: app\r\n      image: your-java-app:latest\r\n<\/code><\/pre>\n<p>Alternatively, you can apply an annotation on the command line using kubectl:<\/p>\n<pre><code>\r\nkubectl annotate pod your-java-app languageStack=java\r\n<\/code><\/pre>\n<p>Annotating your pods indicates that they are running Java applications and that you consent to have them diagnosed using\nAzure Performance Diagnostics Tool for Java. As always with monitoring, although the diagnostic process is designed to be as non-intrusive as\npossible,\nthere is a small amount of overhead involved when running the Java Flight Recorder profiler and the diagnostic\ncontainer.\nIt is recommended to first use this feature in non-production environments and ensure that the diagnostic process does not\ninterfere with your application.<\/p>\n<h2>Build your own Sub-Agent<\/h2>\n<p>You can also create a custom Sub-Agent within Azure SRE Agent, and delegate to the AKS diagnostic analysis tools, in order to\ncreate an\nagent specifically for how you wish to respond to AKS diagnostic needs. You can also delegate to this agent when responding\nto an alert. The following is an example of how to configure a Sub-Agent which includes the Java Performance Diagnostic capability via the SRE Agent GUI:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-scaled.webp\"><img decoding=\"async\" class=\"alignnone wp-image-232614 size-large\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-1024x523.webp\" alt=\"An example of the Sub-Agent builder user interface\" width=\"1024\" height=\"523\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-1024x523.webp 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-300x153.webp 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-768x392.webp 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-1536x785.webp 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2025\/11\/Agent-Builder-2048x1047.webp 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Below is an example YAML configuration that can be pasted into the YAML input dialogue within the create a SRE Sub-Agent Builder UI:<\/p>\n<pre><code>\r\napi_version: azuresre.ai\/v1\r\nkind: AgentConfiguration\r\nspec:\r\n  name: AKSDiagnosticAgent\r\n  system_prompt: &gt;-\r\n    Take the details of a diagnostic analysis to be performed on a AKS container and hand off to the\r\n    appropriate diagnostic tool. If you need to find the resource to diagnose, use the\r\n    SearchResourceByName and ListResourcesByType tools\r\n  tools:\r\n    - GetCPUAnalysis\r\n    - GetMemoryAnalysis\r\n    - SearchResourceByName\r\n    - ListResourcesByType\r\n    - AnalyzeJavaAppInAKSContainer\r\n  handoff_description: &gt;-\r\n    When the user has requested a diagnostic analysis, or it has been determined an AKS diagnostic\r\n    analysis is required\r\nagent_type: Autonomous\r\n<\/code><\/pre>\n<p>You can then interact with this Sub-Agent via the Azure SRE Agent chat interface to request JVM performance analyses as\nneeded, for instance:<\/p>\n<pre><code>\r\n\/agent AKSDiagnosticAgent I am having a performance issue in:\r\npod: illuminate-test-petclinic\r\ncontainer: spring-petclinic-rest\r\nnamespace: illuminate-test\r\naks instance: jeg-aks\r\n<\/code><\/pre>\n<p>This will trigger the Azure Performance Diagnostics Tool for Java process and return a detailed report of findings and recommendations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re excited to announce that the Azure Performance Diagnostics Tool for Java is now available for preview as part of the Azure SRE Agent platform, bringing intelligent, automated Java performance diagnoses. Currently supporting Java workloads deployed to Azure Kubernetes Service (AKS) clusters. What is Azure Performance Diagnostics Tool for Java via Azure SRE Agent? The [&hellip;]<\/p>\n","protected":false},"author":9459,"featured_media":227205,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-232606","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"acf":[],"blog_post_summary":"<p>We&#8217;re excited to announce that the Azure Performance Diagnostics Tool for Java is now available for preview as part of the Azure SRE Agent platform, bringing intelligent, automated Java performance diagnoses. Currently supporting Java workloads deployed to Azure Kubernetes Service (AKS) clusters. What is Azure Performance Diagnostics Tool for Java via Azure SRE Agent? The [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/232606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/users\/9459"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=232606"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/232606\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/227205"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=232606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=232606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=232606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}