A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/standalone below:

Standalone .NET Aspire dashboard - .NET Aspire

The .NET Aspire dashboard provides a great UI for viewing telemetry. The dashboard:

Start the dashboard

The dashboard is started using the Docker command line.

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

The preceding Docker command:

Login to the dashboard

Data displayed in the dashboard can be sensitive. By default, the dashboard is secured with authentication that requires a token to login.

When the dashboard is run from a standalone container, the login token is printed to the container logs. The logs are displayed in the Docker Desktop user interface on the Logs tab for the aspire-dashboard container:

After copying the highlighted token into the login page, select the Login button.

Alternatively, you can obtain the token from the logs by using the docker command:

#!/bin/bash
loginLine=$(docker container logs aspire-dashboard | grep "login?t=")
match=$(echo "$loginLine" | sed -n 's/.*login?t=\([^[:space:]]*\).*/\1/p')
echo -n "$match" | xclip -selection clipboard
echo "$match"

Note

This script requires that your system has the sed and xclip tools installed.

$loginLine =  docker container logs aspire-dashboard | Select-String "login\?t="
$matches = [regex]::Match($loginLine, "(?<=login\?t=)(\S+)")
$matches.Value | Set-Clipboard
echo $matches.Value

Tip

To avoid the login, you can disable the authentication requirement by setting the ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS environment variable to true. Additional configuration is available, see Dashboard configuration.

For more information about logging into the dashboard, see Dashboard authentication.

Explore the dashboard

The dashboard offers a UI for viewing telemetry. Refer to the documentation to explore the telemetry functionality:

Although there is no restriction on where the dashboard is run, the dashboard is designed as a development and short-term diagnostic tool. The dashboard persists telemetry in-memory which creates some limitations:

Unavailable features when standalone

The dashboard has functionality for viewing .NET Aspire resources. The dashboard resource features are disabled when it is run in standalone mode. To enable the resources UI, add configuration for a resource service.

GitHub Copilot functionality isn't available in the standalone dashboard. Copilot uses a connection to your IDE to communicate with GitHub Copilot and that connection isn't available when the dashboard is in standalone mode.

Send telemetry to the dashboard

Apps send telemetry to the dashboard using OpenTelemetry Protocol (OTLP). The dashboard must expose a port for receiving OpenTelemetry data, and apps are configured to send data to that address.

A Docker command was shown earlier to start the dashboard. It configured the container to receive OpenTelemetry data on port 4317. The OTLP endpoint's full address is http://localhost:4317.

Configure OpenTelemetry SDK

Apps collect and send telemetry using their language's OpenTelemetry SDK.

Important OpenTelemetry SDK options to configure:

To configure applications:

Sample

For a sample of using the standalone dashboard, see the Standalone .NET Aspire dashboard sample app.

Next steps

Configure the .NET Aspire dashboard


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4