aspire-monitoring

**ANALYSIS SKILL** - Observe Aspire apps: logs, traces, metrics, resource state, telemetry export, browser telemetry, and the standalone dashboard. Routes…

npx skills add https://github.com/microsoft/aspire-skills --skill aspire-monitoring

Aspire Monitoring

Aspire CLI provides full observability locally. For deployed apps, route to platform-specific tools.

Diagnostics Bridge — Where To Look

NeedEnvironmentToolCommand / Route
Console logsLocal devAspire CLIaspire logs <resource>
Structured logsLocal devAspire CLIaspire otel logs [resource]
Distributed tracesLocal devAspire CLIaspire otel traces [resource]
Span detailLocal devAspire CLIaspire otel spans [resource]
Running AppHostsLocal devAspire CLIaspire ps
Resource stateLocal devAspire CLIaspire describe (add --include-hidden if a resource is missing)
Telemetry exportLocal devAspire CLIaspire export [resource]
Standalone dashboardAny (no AppHost)Aspire CLIaspire dashboard run (foreground/blocking — see below)
Browser console / network / diagnosticsLocal dev (frontend)Aspire CLI + dashboardDiscover <frontend>-browser-logs, start its tracked browser, then inspect its console logs
AppHost / deployment definitionAuthoringaspire-deployment skillaspire-deployment skill
AKS workload (pod logs, pod state)Deployed AKSkubectl + Container Insightskubectl logs <pod>, kubectl describe pod <pod>, Container Insights in Azure Monitor
Azure resource health (App Insights, Front Door, NSP, private endpoint)Deployed Azureazure-diagnosticsazure-diagnostics skill
App Service / Container Apps logsDeployed Azureazure-diagnosticsazure-diagnostics skill
Logs/stateDeployed Docker / ComposeDocker CLIdocker logs <container>, docker compose logs <service>

Decision tree:

  1. Is this about AppHost code or deployment definition? → aspire-deployment skill.
  2. Is the app running locally via aspire start? → Aspire CLI.
  3. Is it deployed to AKS? → kubectl + Container Insights for workload; azure-diagnostics for the cluster's Azure resources.
  4. Is it deployed to other Azure (App Service, Container Apps)? → azure-diagnostics.
  5. Is it deployed to Docker / Compose? → docker / docker compose CLI.

See diagnostics-bridge.md for detailed routing.

Investigation Workflow

When something is wrong, investigate before editing code:

  1. aspire describe — check resource state and endpoints
  2. aspire otel logs <resource> — structured logs first
  3. aspire logs <resource> — console output as secondary view
  4. aspire otel traces <resource> — cross-service activity
  5. aspire export — zipped telemetry snapshot for deeper analysis

Local Commands Reference

CommandPurposeExample
aspire logs <resource>Console stdout/stderraspire logs apiservice
aspire logs --followStream logs in real-timeaspire logs apiservice --follow
aspire otel logsStructured OpenTelemetry logsaspire otel logs
aspire otel tracesDistributed trace dataaspire otel traces
aspire otel spansIndividual span detailaspire otel spans
aspire otel logs --trace-id <id>Logs correlated to trace (⚠️ verify flag)aspire otel logs --trace-id abc123
aspire otel logs --dashboard-urlQuery a standalone dashboard (login URL or base URL + --api-key)aspire otel logs --dashboard-url "http://localhost:18888/login?t=TOKEN" --follow
aspire otel traces --dashboard-urlQuery a standalone dashboardaspire otel traces --dashboard-url "http://localhost:18888/login?t=TOKEN"
aspire describeResource state, endpoints, healthaspire describe --format Json
aspire describe --include-hiddenInclude proxies, helper containers, migrationsaspire describe --include-hidden --format Json
aspire resourcesCompatibility alias for resource statePrefer aspire describe in new guidance
aspire exportPortable telemetry bundleaspire export
aspire dashboard runStandalone dashboard (foreground/blocking)aspire dashboard run

Hidden resources are filtered by default

aspire describe and other CLI commands filter out resources marked hidden in the AppHost (proxies, helper containers, migrations). The default output is correct for normal app inspection. Add --include-hidden when:

  • Debugging proxies, sidecar/helper containers, or migration jobs.
  • An expected resource is "missing" from aspire resources / aspire describe.
  • Triaging connectivity or wiring issues that may involve infrastructure resources.

Tips for Agents

# ✅ Use --format Json for machine parsing (supported: describe, start)
aspire describe --format Json

# ✅ When a resource you expect is missing, retry with --include-hidden
aspire describe --include-hidden --format Json

# ✅ Get endpoints from describe, not guessing ports
ENDPOINT=$(aspire describe apiservice --format Json | jq -r '.endpoints[0].url')

# ✅ Use --apphost <path> when multiple AppHosts exist
aspire describe --apphost ./src/MyApp.AppHost/

Version-Specific Diagnostics

Symptom13.5.3 guidance
Resource missing from aspire describeRe-run aspire describe --include-hidden; do not use removed aspire ps --include-hidden.
DevTunnel is healthy but has no public URL on 13.5.0-13.5.2Upgrade the CLI/SDK to 13.5.3 before changing endpoint configuration; 13.5.3 restores the URL.
Dashboard Graph crashes for a resource such as Azure BlobUpgrade to 13.5.3; multi-path resource icons are fixed there.

Resolved in 13.3: The standalone-dashboard workaround for #16236 is obsolete — use aspire dashboard run (see below).

Standalone Dashboard (aspire dashboard run)

aspire dashboard run launches the Aspire Dashboard without an AppHost, so any OTLP-emitting application (Aspire or not) can stream telemetry into it.

aspire dashboard run
# Dashboard:  http://localhost:18888/login?t=<TOKEN>
# OTLP/gRPC:  http://localhost:4317
# OTLP/HTTP:  http://localhost:4318

⚠️ Foreground / blocking. aspire dashboard run does not return until you stop it (Ctrl-C). Agents must treat it as a long-running background process — start it with the bash tool's mode="async", capture the dashboard URL and token from initial output, and leave it running. Do not invoke it as a one-shot synchronous command, and do not wait for it to "finish".

Connect the Aspire CLI to a standalone dashboard

aspire otel logs and aspire otel traces accept --dashboard-url. The simplest form passes the full login URL printed by aspire dashboard run — the CLI normalizes it automatically:

# Stream structured logs from a standalone dashboard (login URL form)
aspire otel logs --dashboard-url "http://localhost:18888/login?t=TOKEN" --follow

# Search recent traces
aspire otel traces --dashboard-url "http://localhost:18888/login?t=TOKEN"

For dashboards configured with API-key authentication (e.g., the standalone container image with a separate API key), pass --api-key alongside the base --dashboard-url:

aspire otel logs --dashboard-url https://my-dashboard.example.com --api-key "$DASHBOARD_API_KEY" --follow

The container-image standalone dashboard still works for environments where the CLI isn't available.

Browser Logs (Aspire.Hosting.Browsers)

When a frontend has already opted into WithBrowserLogs(), Aspire creates a child resource named <frontend>-browser-logs. Browser console messages, errors, exceptions, and network diagnostics are sent to that child resource's console log stream, not to the frontend's OpenTelemetry logs.

  1. Begin with normal aspire describe or aspire resources output to find <frontend>-browser-logs; aspire ps no longer lists resources. It is a normal child resource, so retry with aspire describe --include-hidden only if unavailable.

  2. Correlate it to the frontend through its parent relationship and Source property.

  3. Start a tracked browser session with:

    aspire resource <frontend>-browser-logs open-tracked-browser
    
  4. Inspect the browser diagnostics with:

    aspire logs <frontend>-browser-logs
    

Do not use aspire otel logs <frontend> for browser output; it does not return that child resource's browser diagnostics.

NeedAction
Inspect existing browser diagnosticsDiscover <frontend>-browser-logs, start open-tracked-browser, then run aspire logs <frontend>-browser-logs
Confirm the browser resource belongs to a frontendCheck the child resource's parent relationship and Source property
Confirm a frontend has browser logging enabledCheck the AppHost for .WithBrowserLogs() on the resource
Add WithBrowserLogs() to a resourceaspireify skill (AppHost authoring) — do not edit the AppHost from this skill

Dashboard UX Features

Agents inspecting a running dashboard should know:

  • Notification center (bell icon, top-right) — surfaces results of resource commands and lifecycle events. Inline command responses appear here instead of being scraped from the logs panel.
  • Rebuild command — available on container and project resources; rebuilds the image and restarts the resource without restarting the whole AppHost. Result lands in the notification center.
  • Structured command results — custom resource commands return ExecuteCommandResult with a Message payload that the dashboard renders inline; HTTP commands set HttpCommandResultMode.Auto | Json | Text | None to control how the response body is shown.
  • 13.5 filtering — filter telemetry by timestamp, use == / != for exact numeric values, and search console-log text while streams continue updating.
  • Terminal view — resources configured with experimental WithTerminal() open as interactive sessions in the dashboard.
  • No dashboard AI Assistant — it was removed in 13.5. Use aspire agent init and the AppHost/CLI agent integration instead.
  • VS Code launch is opt-in — the Aspire extension no longer opens the dashboard automatically. Use its in-editor dashboard or configure dashboardBrowser / launch.json.

Authoring custom commands or WithBrowserLogs() calls is AppHost work — route to aspireify. This skill is for observing what those features surface in the dashboard.

Why Aspire CLI Can't Do Remote Diagnostics

The Aspire CLI talks to a running AppHost through a local backchannel socket at ~/.aspire/backchannels/. This is by design — there is no remote backchannel. For deployed apps, route to platform-specific tools (azure-diagnostics, kubectl, docker).

Exception: if a Dashboard is reachable (deployed alongside the app, or running standalone), aspire otel logs and aspire otel traces can query it via --dashboard-url (login URL form) and optional --api-key (see the Standalone Dashboard section above). This does not apply to aspire logs or aspire describe.

Handoff Rules

ScenarioRoute To
Start/stop/wait/rebuild lifecycleaspire-orchestration skill
Deploy, publish, pipeline steps, AppHost compute environment bindingaspire-deployment skill
AppHost code changes (WithBrowserLogs(), custom commands, WithHttpCommand)aspireify skill
Deployed Azure resource health (App Insights, Front Door, NSP, private endpoint, ACA, App Service)azure-diagnostics skill (azure-skills)
AKS workload diagnostics (pod logs, pod state, Container Insights)kubectl + Azure Monitor Container Insights
Docker / Compose container logsdocker logs / docker compose logs

Project-Local Skill Routing

If .agents/skills/aspire/SKILL.md exists (from aspire agent init), see its references/monitoring.md for deeper telemetry workflow guidance.

References

More skills from microsoft

oss-growth
microsoft
OSS growth hacker persona
agent-framework-azure-ai-py
microsoft
Build Azure AI Foundry agents using the Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Use when creating persistent agents with AzureAIAgentsProvider, using hosted tools (code interpreter, file search, web search), integrating MCP servers, managing conversation threads, or implementing streaming responses. Covers function tools, structured outputs, and multi-tool agents.
development
airunway-aks-setup
microsoft
Set up AI Runway on AKS — from bare cluster to running model. Covers cluster verification, controller install, GPU assessment, provider setup, and first deployment. WHEN: "setup AI Runway", "onboard AKS cluster", "install AI Runway", "airunway setup", "deploy model to AKS", "GPU inference on AKS", "KAITO setup on AKS", "run LLM on AKS", "vLLM on AKS", "set up model serving on AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
devops
applicationinsights-web-ts
microsoft
Instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web). Use for Real User Monitoring (RUM) — page views, clicks, AJAX/fetch dependencies, exceptions, custom events, and browser-side GenAI agent traces correlated to backend OpenTelemetry traces. Covers SDK Loader Script and npm setup, framework extensions (React, React Native, Angular), Click Analytics, telemetry initializers, and OTel GenAI semantic conventions for agent/tool/model spans emitted from the browser.
devops
azure-ai-anomalydetector-java
microsoft
Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.
development
azure-ai-language-conversations-py
microsoft
Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK. Use when working with ConversationAnalysisClient to analyze conversation intent and entities, building NLP features, or integrating language understanding into applications.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. Use for ML workspaces, jobs, models, datasets, compute, and pipelines. Triggers: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development