See live data on Azure Container Apps with the Aspire dashboard
Published May 21 2024 09:22 AM 2,060 Views
Microsoft

Azure Container Apps will be rolling out support this month for the new Aspire dashboard announced in .NET 8. This improvement makes it easier than ever for developers hosting on ACA to monitor their applications, identify abnormalities in their metrics, and debug errors.

 

This blog post will tell you about the Aspire dashboard and why it can save product teams a great deal of money, stress, and development time. Then, we will walk through how to enable and access the dashboard for your project in ACA.

 

What is the Aspire dashboard?

 

Distributed applications can involve a lot of resources, split across multiple services. It is important for developers to be able to get an overview of their project while being able to dive into the details of individual containers. Strong observability and monitoring tools are key for developing and maintaining scalable, resilient, and cost-effective applications for the cloud.

Azure Container Apps has always offered extensive offerings for logging and monitoring. The Aspire dashboard provides a developer-centric, live view of the telemetry for all ACA apps within a container environment, all in a simple UI interface. The dashboard makes it easier to diagnose issues across the container environment by displaying data of the current session with minimal delay.

 

JiachenJiang_0-1716308360466.png

 

Note: As a developer tool, the dashboard provides a view of the current state of the application, but does not include persistance or a historical view of the telemetry data, and is not intended to replace APMs for operational monitoring of your applications, for that we recommend Application Insights or an APM from other vendors.

 

For detailed information about the dashboard functionality, reference the .NET team’s documentation here. To learn more about how the dashboard’s architecture and implementation, look here.

 

Getting started with the Aspire dashboard

 

Curious and want to try it out yourself? In the section below, we will show you how to enable and deploy the Aspire dashboard through the Azure Portal, Azure Developer CLI (Azd), and the Azure CLI.

 

For more detailed guidance, refer to this documentation.

 

Azure Developer CLI (AZD)

 

You can enable the .NET Aspire Dashboard on any existing container app using the following steps.

 

 

 

dotnet new aspire-starter
azd init --location westus2
azd config set alpha.aspire.dashboard on
azd up

 

 

 

The up command returns the dashboard URL that you can open in a browser.

Portal

 

We recommend enabling your dashboard with AZD. While you can enable your dashboard in Portal, there are some issues that are still being ironed out. If you run into one, please let us now on our GitHub repo!

 

To get started, navigate to the Overview page on your Container Apps Resource.

 

JiachenJiang_1-1716308072240.png

 

 

Click on “enable” and you will be redirected to the “Logging options” page where you can enable your dashboard.

 

JiachenJiang_2-1716308084369.png

 

 

Once the change has been made, your Container Apps Overview will display the link to your dashboard.

 

Troubleshooting

 

There are a few common issues that may come up in enabling your Aspire dashboard.

  • Currently the Portal experience will take up to two minutes for the dashboard to be provisioned. If you open the link before then, you will see a 404 or 421 error response.
    • If you see the 421 "Misdirected Request", please close the browser window, wait a few minutes, and try again.
  • You may receive an authentication error when accessing the dashboard – “Could not authenticate user with requested resource.”
    • To solve this problem, ensure you have been granted "Microsoft.App/managedEnvironments/write", "Contributor", or "Owner" on the container app environment resource.

What if I’m not using .NET?

 

The Aspire dashboard will work for any Container App emitting telemetry using the OpenTelemety OTLP protocol in gRPC format. That means if you have some of your project written in Java and the rest in .NET, you can get accurate data across your whole solution.

 

If you are not developing with .NET and want to use the Aspire dashboard, it is available as a Docker image here.

 

Next Steps

 

Congratulations, you have just set up the Aspire dashboard for your application! You should now have a better understanding of the benefits it has for your project. Thank you for reading!

Want to learn more? You can...

 

 

 

 

 

Co-Authors
Version history
Last update:
‎May 21 2024 09:22 AM
Updated by: