The Aspire dashboard: resources and resource commands, console vs structured logs, traces and span details, metrics, how OTLP telemetry reaches it, the standalone dashboard, telemetry limits and security, and using it to debug cross-service problems.
The Aspire dashboard is a local observability UI that the AppHost starts automatically. Each service's OpenTelemetry exporter sends OTLP to it, because the AppHost sets OTEL_EXPORTER_OTLP_ENDPOINT.
To debug, I find the failing or slow trace, open the span, jump to its logs, then check the resource's configuration. Telemetry lives in memory with limits, so it's ideal for development and short-lived test environments, but not a replacement for Application Insights or Grafana in production.
"The dashboard is the part of Aspire people end up using every day. When the AppHost starts, it launches the dashboard and gives every resource an
OTEL_EXPORTER_OTLP_ENDPOINTpointing at it, and service defaults add the OTLP exporter, so logs, traces and metrics flow in with no extra set-up. The resources page shows each project and container with its state, health, endpoints and the environment variables Aspire injected, which is the first place I look when something can't connect. I can also stop or restart a single resource from there to test how the others cope.For debugging I usually start from traces. Say the checkout call is slow: I filter traces by the API resource, sort by duration, and open the slow one. The waterfall shows the API span, the HTTP client span to the pricing service, its server span, and the SQL spans under that, so it's obvious whether the time is in a query, in a retry, or in a gap where nothing is instrumented. From a span I jump to the structured logs for that trace id and see the exception with its properties. Metrics I use for patterns, like the
http.server.request.durationhistogram during a quick load test, or the thread-pool queue length.The mistake I see is people treating it as production monitoring because it looks so good. It keeps telemetry in memory with limits, has no alerting and no long-term retention, so it's for development, test runs and short-lived environments. In production the same OpenTelemetry data goes to Application Insights or a Collector. I see the dashboard as a way to make the instrumentation good before production needs it."
| View | Shows | I use it for |
|---|---|---|
| Resources | State, health, endpoints, env vars, commands, relationships graph | Wiring problems, restarting one dependency |
| Console logs | Raw stdout/stderr per resource | Start-up crashes, container logs |
| Structured logs | OpenTelemetry log records with properties, level, trace id | Filtering errors by property, following one request |
| Traces | Span waterfall across resources | Latency and failure location |
| Metrics | Instruments with tag filters and charts | Load behaviour, runtime health, custom business metrics |
| Step | Where | Question it answers |
|---|---|---|
| 1 | Traces, filter by resource, errors or duration | Which request failed or was slow? |
| 2 | Span details | Which service and which call? Status, attributes, exception events |
| 3 | Structured logs for that trace | What did the code log around it? |
| 4 | Resources, env vars | Is the wiring or configuration right? |
| 5 | Metrics | Is this one request or a pattern under load? |
| Aspire dashboard | Application Insights / Grafana stack | |
|---|---|---|
| Storage | In memory, capped | Durable, retention policies |
| Alerting | None | Alerts, SLOs, action groups |
| Multi-user, RBAC | Token or OpenID Connect sign-in only | Full RBAC |
| Cost | Free | Ingestion and retention costs |
| Best for | Inner loop, test runs, short-lived environments | Production |
A team had a checkout endpoint taking [1.8 s] locally and blamed SQL Server. The dashboard trace showed three sequential HTTP calls to the pricing service per line item, an N+1 across services. Batching them into one call took the endpoint to [220 ms] before the change reached production.
Checks whether the candidate uses the dashboard effectively for real debugging and knows its limits.
Green flags
Red flags
Service (OpenTelemetry SDK, via AddServiceDefaults)
| OTLP (gRPC or HTTP/protobuf)
| endpoint from OTEL_EXPORTER_OTLP_ENDPOINT, auth header from OTEL_EXPORTER_OTLP_HEADERS
v
Aspire dashboard --- in-memory stores (logs, spans, metrics) ---> Blazor UI in the browser
^
| resource state, console logs, commands
AppHost (resource service over gRPC)
Telemetry and resource information arrive separately: OTLP from each service, and resource state and console output from the AppHost. That's why the standalone dashboard can show telemetry but not resources.
Console logs are whatever the process writes to stdout/stderr, captured by the orchestrator, including container output from SQL Server or Redis. They are the right place to look before logging is configured: start-up crashes, missing assemblies, a container that won't start.
Structured logs are ILogger calls exported as OpenTelemetry log records. The message template ("Checked out cart {CartId}") is kept separately from its property values, along with scopes, level, category and the active trace and span id. That's what makes them useful:
CartId = 42 or LogLevel >= Warning across every service at once.To make them useful you have to write them properly: message templates rather than string interpolation, stable property names, LoggerMessage source generators on hot paths, and scopes (BeginScope) for values like tenant-free context such as order id.
Each span carries resource name, timing, status, attributes (http.route, server.address, database spans with the operation and, if enabled, the query text) and events (exceptions). Spans from different services join into one trace because W3C traceparent headers propagate automatically through HttpClient and ASP.NET Core. Gaps in the waterfall usually mean uninstrumented work (a custom loop, a library without an ActivitySource) or broken propagation (messages, background work).
The dashboard charts any instrument the service exports: ASP.NET Core (http.server.request.duration, kestrel.active_connections), HttpClient (http.client.request.duration), runtime metrics built into .NET 9 and later and therefore .NET 10 (dotnet.gc.collections, dotnet.thread_pool.queue.length, following OpenTelemetry semantic conventions) and your own Meter instruments. Exemplars can link a metric point to a trace.
The dashboard and production backends consume the same OTLP data with the same trace ids and attribute names, so the habits transfer directly:
| Dashboard | Application Insights | Grafana stack |
|---|---|---|
| Traces view | Transaction search / end-to-end transaction details | Tempo |
| Structured logs filtered by trace id | traces table in Log Analytics joined on operation_Id |
Loki with trace id derived field |
| Metrics view | Metrics explorer / customMetrics |
Prometheus / Mimir |
A useful habit: when you find a problem locally, write down the query you'd use in production to detect it (for example a KQL query on dependencies grouped by operation_Id counting calls to pricing), then add it as a dashboard tile or alert.
The dashboard also ships as a container image (mcr.microsoft.com/dotnet/aspire-dashboard), with the UI on port 18888 and OTLP on 18889 (gRPC) inside the container, plus an OTLP/HTTP port for browser apps. Any OpenTelemetry-instrumented app, not just Aspire ones, can send to it. It's handy for Docker Compose set-ups, CI test runs and quick investigations. Azure Container Apps also offers an Aspire dashboard component for an environment, for short-term troubleshooting.
Meter with a counter, export it with AddMeter, and chart it.bombardier or k6) and watch request duration percentiles and thread-pool queue length.Making your own work visible on the dashboard: a custom span, a structured log and a business metric.
// Orders.Api/Checkout/CheckoutService.cs
namespace Orders.Api.Checkout;
using System.Diagnostics;
using System.Diagnostics.Metrics;
public sealed class CheckoutService(PricingClient pricing, ILogger<CheckoutService> logger, IMeterFactory meters)
{
public static readonly ActivitySource Source = new("Orders.Checkout"); // register with AddSource("Orders.*")
private readonly Counter<long> _checkouts =
meters.Create("Orders.Checkout").CreateCounter<long>("orders.checkouts", unit: "{checkout}");
public async Task<decimal> CheckoutAsync(Cart cart, CancellationToken ct)
{
using var activity = Source.StartActivity("Checkout"); // null if nobody listens: cheap
activity?.SetTag("cart.lines", cart.Lines.Count);
// One batched call instead of one per line (the N+1 the dashboard exposed).
var total = await pricing.PriceAsync(cart.Lines, ct);
logger.LogInformation("Checked out cart {CartId} with {LineCount} lines for {Total}", cart.Id, cart.Lines.Count, total);
_checkouts.Add(1, new KeyValuePair<string, object?>("payment.method", cart.PaymentMethod));
return total;
}
}
public sealed record Cart(Guid Id, IReadOnlyList<CartLine> Lines, string PaymentMethod);
public sealed record CartLine(int ProductId, int Quantity);
# Standalone dashboard for apps that aren't using an AppHost (e.g. Docker Compose or CI)
docker run --rm -it -p 18888:18888 -p 4317:18889 \
--name aspire-dashboard mcr.microsoft.com/dotnet/aspire-dashboard:latest
# then in the app's environment:
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# OTEL_SERVICE_NAME=orders-api
StartActivity returns null and the meter isn't collected, so nothing appears and people assume tracing is broken. Instead: AddSource(...) and AddMeter(...) in service defaults.$"Order {id} failed"). Why it is wrong: The value is baked into the message, so you can't filter by property and every event has a unique template. Instead: Message templates or LoggerMessage source-generated methods.Microsoft.Extensions.Compliance.Redaction).The dashboard's biggest value is cultural: developers see traces every day, so instrumentation quality gets fixed before production. I ask teams to check the trace for every new endpoint in the pull request, just as they'd run the tests.
| Tool | When it fits | Cost | When not to |
|---|---|---|---|
| Aspire dashboard (AppHost) | Daily inner loop | None | Anything needing retention |
| Standalone dashboard container | Compose set-ups, CI, quick checks | A container | Shared long-lived environments |
| Container Apps dashboard component | Short-term troubleshooting in a test environment | Small; security set-up | Production observability |
| Application Insights / Grafana | Production, alerting, SLOs | Ingestion and retention | Local development |
I'd measure first: a KQL query for requests whose operation_ParentId points at a span that doesn't exist, grouped by service, tells me which hop breaks. Then I check the wire: does the caller send traceparent, and does the callee receive it? That splits the causes:
HttpClient with propagation turned off, or an API gateway or proxy that strips or rewrites it (B3 vs W3C).AddSource, or exports to a different backend.Channel<T>, a queue or a new thread loses Activity.Current, so you pass the ActivityContext yourself.The trade-off: fixing each hop by hand is quick; preventing it needs a shared template and a propagation test.
All of them store and show traces; they differ in who runs them and how they price and store data.
From .NET you instrument once with OpenTelemetry and export OTLP, ideally through a Collector that can batch, sample and fan out. The trade-off: managed backends cost money per GB; self-hosted ones cost engineering time.
I put a feature's metrics in one singleton class that takes IMeterFactory, creates a Meter named after the component (Shop.Orders) and creates the instruments once: a Counter<long> for events such as orders placed, a Histogram<double> in seconds for durations, and an ObservableGauge<T> for current state. Names follow OpenTelemetry semantic conventions (shop.orders.placed, unit {order}), and tags are bounded (channel, outcome), never customer or order ids.
OpenTelemetry picks them up when I register the meter name with AddMeter inside WithMetrics, and the exporter (OTLP to a Collector, the Azure Monitor distro, or Prometheus) is a separate decision. I test with MetricCollector<T> from Microsoft.Extensions.Diagnostics.Testing, which captures measurements from a meter created by the same factory.
The trade-off: every tag value and histogram bucket is a time series you pay for, so I add metrics for questions someone will actually ask.
How to tell it (STAR)
**S:** Before our [Black Friday] release, checkout took almost [two seconds] locally and the team was sure it was a database index. **T:** I wanted to find the real cause before we tuned the wrong thing. **A:** I opened the trace in the Aspire dashboard and saw [20] sequential calls to the pricing service, one per cart line. I added a batch endpoint, made checkout call it once, and added a span and a test to keep it that way. **R:** Checkout dropped to [about 220 ms], and we went into the sale without a database change we didn't need.
Last updated 23 Nov 2026.