Bearbeiten

Freigeben über


.NET Aspire dashboard overview

.NET Aspire project templates offer a sophisticated dashboard for comprehensive app monitoring and inspection, and it's also available in standalone mode. This dashboard allows you to closely track various aspects of your app, including logs, traces, and environment configurations, in real-time. It's purpose-built to enhance the development experience, providing an insightful overview of your app's state and structure.

Use the dashboard with .NET Aspire projects

The dashboard is integrated into the .NET Aspire AppHost. During development the dashboard is automatically launched when you start the project. It's configured to display the .NET Aspire project's resources and telemetry.

A screenshot of the .NET Aspire dashboard Resources page.

For more information about using the dashboard during .NET Aspire development, see Explore dashboard features.

Standalone mode

The .NET Aspire dashboard is also shipped as a Docker image and can be used standalone, without the rest of .NET Aspire. The standalone dashboard provides a great UI for viewing telemetry and can be used by any application.

docker run --rm -it -p 18888:18888 -p 4317:18889 -d --name aspire-dashboard \
    mcr.microsoft.com/dotnet/aspire-dashboard:8.2

The preceding Docker command:

  • Starts a container from the mcr.microsoft.com/dotnet/aspire-dashboard:8.2 image.
  • The container publishes exposing two ports:
    • Maps the dashboard's OTLP port 18889 to the host's port 4317. Port 4317 receives OpenTelemetry data from apps. Apps send data using OpenTelemetry Protocol (OTLP).
    • Maps the dashboard's port 18888 to the host's port 18888. Port 18888 has the dashboard UI. Navigate to http://localhost:18888 in the browser to view the dashboard.

For more information, see the Standalone .NET Aspire dashboard.

Configuration

The dashboard is configured when it starts up. Configuration includes frontend and OTLP addresses, the resource service endpoint, authentication, telemetry limits and more.

For more information, see .NET Aspire dashboard configuration.

Architecture

The dashboard user experience is built with a variety of technologies. The frontend is built with Microsoft's Fluent UI Blazor integration library. Each app communicates to the dashboard using the OpenTelemetry Protocol (OTLP). A resource server exists within this architecture to provide information about the app's resources, such as a resource listing, console logs, and command execution. The dashboard communicates using gRPC (specifically with the Grpc.AspNetCore NuGet package) to the resource server. Consider the following diagram that illustrates the architecture of the .NET Aspire dashboard:

A diagram showing the architecture of the .NET Aspire dashboard.

Security

The .NET Aspire dashboard offers powerful insights to your apps. The UI displays information about resources, including their configuration, console logs and in-depth telemetry.

Data displayed in the dashboard can be sensitive. For example, configuration can include secrets in environment variables, and telemetry can include sensitive runtime data. Care should be taken to secure access to the dashboard.

For more information, see .NET Aspire dashboard security considerations.

Next steps