Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
The Basic, Standard, and Enterprise plans will be deprecated starting from mid-March, 2025, with a 3 year retirement period. We recommend transitioning to Azure Container Apps. For more information, see the Azure Spring Apps retirement announcement.
The Standard consumption and dedicated plan will be deprecated starting September 30, 2024, with a complete shutdown after six months. We recommend transitioning to Azure Container Apps. For more information, see Migrate Azure Spring Apps Standard consumption and dedicated plan to Azure Container Apps.
This article applies to: ✅ Basic/Standard ✅ Enterprise
This article describes how to manually generate a heap dump or thread dump, and how to start Java Flight Recorder (JFR).
Effective troubleshooting is critical to ensure you can fix issues in production environments and keep your business online. Azure Spring Apps provides application log streaming and query, rich metrics emitting, alerts, distributed tracing, and so forth. However, when you get alerts about requests with high latency, JVM heap leak, or high CPU usage, there's no last-mile solution. For this reason, we've enabled you to manually generate a heap dump, generate a thread dump, and start JFR.
Use the following command to generate a heap dump of your app in Azure Spring Apps.
az spring app deployment generate-heap-dump \
--resource-group <resource-group-name> \
--service <Azure-Spring-Apps-instance-name> \
--app <app-name> \
--deployment <deployment-name> \
--app-instance <app-instance name> \
--file-path <your-target-file-path-in-your-persistent-storage-mount-path>
Use the following command to generate a thread dump of your app in Azure Spring Apps.
az spring app deployment generate-thread-dump \
--resource-group <resource-group-name> \
--service <Azure-Spring-Apps-instance-name> \
--app <app-name> \
--deployment <deployment-name> \
--app-instance <app-instance name> \
--file-path <your-target-file-path-in-your-persistent-storage-mount-path>
Use the following command to start JFR for your app in Azure Spring Apps.
az spring app deployment start-jfr \
--resource-group <resource-group-name> \
--service <Azure-Spring-Apps-instance-name> \
--app <app-name> \
--deployment <deployment-name> \
--app-instance <app-instance name> \
--file-path <your-target-file-path-in-your-persistent-storage-mount-path> \
--duration <duration-of-JFR>
The default value for duration
is 60 seconds.
Use the following steps to generate a heap or thread dump of your app in Azure Spring Apps.
In the Azure portal, navigate to your target app, then select Troubleshooting.
In the Troubleshooting pane, select the app instance and the type of dump you'd like to collect.
In the File path field, specify the mount path of your persistent storage.
Select Collect.
Navigate to the target file path in your persistent storage and find your dump/JFR. From there, you can download them to your local machine. The name of the generated file will be similar to <app-instance>heapdump<time-stamp>.hprof for the heap dump, <app-instance>threaddump<time-stamp>.txt for the thread dump, and <app-instance>JFR<time-stamp>.jfr for the JFR file.
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Monitoring Java applications on Azure - Training
Learn how to use monitoring for your Java applications on Azure
Certification
Microsoft Certified: Azure for SAP Workloads Specialty - Certifications
Demonstrate planning, migration, and operation of an SAP solution on Microsoft Azure while you leverage Azure resources.