Subchapter 33.3
references/dashboard.mdMarkdown6 KBView on GitHub
The Aspire Dashboard provides real-time observability for all resources in your distributed application. It launches automatically with aspire run and can also run standalone.
Displays all resources (projects, containers, executables) with:
Aggregated raw stdout/stderr from all resources:
Application-level structured logs (via ILogger, OpenTelemetry):
End-to-end request traces across all services:
Real-time and historical metrics:
For applications using AI/LLM integrations:
By default, the dashboard runs on an auto-assigned port. Find it:
aspire run startslist_resources tool--dashboard-port:aspire run --dashboard-port 18888Run the dashboard without an AppHost — useful for existing applications that already emit OpenTelemetry:
docker run --rm -d \
-p 18888:18888 \
-p 4317:18889 \
mcr.microsoft.com/dotnet/aspire-dashboard:latest| Port | Purpose |
|---|---|
18888 | Dashboard web UI |
4317 → 18889 | OTLP gRPC receiver (standard OTel port → dashboard internal) |
Point your OpenTelemetry exporters at the dashboard:
# Environment variables for any language's OpenTelemetry SDK
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=my-serviceservices:
dashboard:
image: mcr.microsoft.com/dotnet/aspire-dashboard:latest
ports:
- "18888:18888"
- "4317:18889"
api:
build: ./api
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://dashboard:18889
- OTEL_SERVICE_NAME=api
worker:
build: ./worker
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://dashboard:18889
- OTEL_SERVICE_NAME=workerThe standalone dashboard supports authentication via browser tokens:
docker run --rm -d \
-p 18888:18888 \
-p 4317:18889 \
-e DASHBOARD__FRONTEND__AUTHMODE=BrowserToken \
-e DASHBOARD__FRONTEND__BROWSERTOKEN__TOKEN=my-secret-token \
mcr.microsoft.com/dotnet/aspire-dashboard:latest# Accept OTLP over gRPC (default)
-e DASHBOARD__OTLP__GRPC__ENDPOINT=http://0.0.0.0:18889
# Accept OTLP over HTTP
-e DASHBOARD__OTLP__HTTP__ENDPOINT=http://0.0.0.0:18890
# Require API key for OTLP
-e DASHBOARD__OTLP__AUTHMODE=ApiKey
-e DASHBOARD__OTLP__PRIMARYAPIKEY=my-api-key# Limit log entries retained
-e DASHBOARD__TELEMETRYLIMITS__MAXLOGCOUNT=10000
# Limit trace entries retained
-e DASHBOARD__TELEMETRYLIMITS__MAXTRACECOUNT=10000
# Limit metric data points
-e DASHBOARD__TELEMETRYLIMITS__MAXMETRICCOUNT=50000The dashboard integrates with GitHub Copilot in VS Code:
For non-.NET services to appear in the dashboard, they must emit OpenTelemetry signals. Aspire auto-injects the OTLP endpoint env var when using .WithReference():
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
import os
# Aspire injects OTEL_EXPORTER_OTLP_ENDPOINT automatically
endpoint = os.environ.get("OTEL_EXPORTER_OTLP_ENDPOINT", "http://localhost:4317")
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(endpoint=endpoint)))
trace.set_tracer_provider(provider)const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
const { OTLPTraceExporter } = require("@opentelemetry/exporter-trace-otlp-grpc");
const provider = new NodeTracerProvider();
provider.addSpanProcessor(
new BatchSpanProcessor(
new OTLPTraceExporter({
url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4317",
})
)
);
provider.register();