Skip to content

Commit b9224a6

Browse files
IEvangelistJamesNK
andauthored
Fun times... (#3505)
* Add GHCP dashboard documentation * Update * Update what's new * Fixes --------- Co-authored-by: James Newton-King <[email protected]>
1 parent 42f0529 commit b9224a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1074
-3
lines changed

docs/app-host/configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ By default, the dashboard is automatically started by the app host. The dashboar
7777
| `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` | `null` | Configures the dashboard OTLP HTTP address. Used by the dashboard to receive telemetry over OTLP. If only `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` is configured then it is set on resources as the `OTEL_EXPORTER_OTLP_ENDPOINT` env var. The `OTEL_EXPORTER_OTLP_PROTOCOL` env var is `http/protobuf`. |
7878
| `ASPIRE_DASHBOARD_CORS_ALLOWED_ORIGINS` | `null` | Overrides the CORS allowed origins configured in the dashboard. This setting replaces the default behavior of calculating allowed origins based on resource endpoints. |
7979
| `ASPIRE_DASHBOARD_FRONTEND_BROWSERTOKEN` | Automatically generated 128-bit entropy token. | Configures the frontend browser token. This is the value that must be entered to access the dashboard when the auth mode is BrowserToken. If no browser token is specified then a new token is generated each time the app host is launched. |
80+
| `ASPIRE_DASHBOARD_TELEMETRY_OPTOUT` | `false` | Configures the dashboard to never send [usage telemetry](../fundamentals/dashboard/microsoft-collected-dashboard-telemetry.md). |
81+
| `ASPIRE_DASHBOARD_AI_DISABLED` | `false` | [GitHub Copilot in the dashboard](../fundamentals/dashboard/copilot.md) is available when the app host is launched by a supported IDE. When set to `true` Copilot is disabled in the dashboard and no Copilot UI is visible. |
8082

8183
## Internal
8284

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: GitHub Copilot in the .NET Aspire dashboard
3+
description: Learn how to use GitHub Copilot in the .NET Aspire dashboard.
4+
ms.date: 05/19/2025
5+
ms.topic: reference
6+
---
7+
8+
# GitHub Copilot in the .NET Aspire dashboard
9+
10+
Introducing GitHub Copilot in the .NET Aspire dashboard! GitHub Copilot is your new AI debugging assistant.
11+
12+
GitHub Copilot supercharges the dashboard's OpenTelemetry debugging and diagnostics experience. With AI, you can:
13+
14+
- Review hundreds of log messages with a single click
15+
- Investigate the root cause of errors across multiple apps
16+
- Highlight performance issues in traces
17+
- Explain obscure error codes using AI's huge knowledge repository
18+
19+
You'll have access to Copilot in the dashboard when you launch your app from VS Code or Visual Studio.
20+
21+
## Requirements
22+
23+
GitHub Copilot is only available when a .NET Aspire project is run from an IDE.
24+
25+
> [!div class="checklist"]
26+
>
27+
> - VS Code and C# Dev Kit 1.19.63 or later.
28+
> - Visual Studio 17.14 or later.
29+
30+
You must also be logged into a GitHub account in the IDE that has a GitHub Copilot subscription. Copilot interactions in the .NET Aspire dashboard use the GitHub account associated with your IDE.
31+
32+
If you don't have a Copilot subscription yet, you can use Copilot for free by signing up for the [Copilot Free plan](https://aka.ms/dotnet/aspire/copilot-free-signup), which includes a monthly limit of chat interactions.
33+
34+
## Get started
35+
36+
To get started, launch your .NET Aspire solution as usual in your IDE.
37+
38+
1. Open your .NET Aspire solution in a supported version of Visual Studio or VS Code with the [C# Dev Kit extension](/visualstudio/subscriptions/vs-c-sharp-dev-kit) installed.
39+
2. Ensure you're logged into the IDE with a GitHub account:
40+
- For Visual Studio, see [Add your GitHub accounts to your Visual Studio keychain](https://aka.ms/dotnet/aspire/copilot-vs-login).
41+
- For VS Code and C# Dev Kit, see [Set up GitHub Copilot in VS Code](https://aka.ms/dotnet/aspire/copilot-vscode-login).
42+
3. Run the .NET Aspire app host.
43+
44+
A GitHub Copilot button appears in the top-right corner of the dashboard. Selecting the button opens the Copilot UI.
45+
46+
:::image type="content" source="media/copilot/copilot-headerbutton.png" lightbox="media/copilot/copilot-headerbutton.png" alt-text="A screenshot of the dashboard with the GitHub Copilot button highlighted.":::
47+
48+
In the Copilot UI, you can either select a suggested question, such as **Summarize resources**, or enter your own question in the chat input field. Press <kbd>Enter</kbd> to submit. For example: `What health checks are configured in my app?`
49+
50+
:::image type="content" source="media/copilot/copilot-chatquestion.png" lightbox="media/copilot/copilot-chatquestion.png" alt-text="A screenshot of the dashboard with GitHub Copilot open. It contains a chat question and answer.":::
51+
52+
At the top of the Copilot UI are buttons to start a new conversation, expand the chat, or close the UI.
53+
54+
## Analyze resources, console logs, and telemetry
55+
56+
There are several options for analyzing resources, console logs, and telemetry in your app. Two were discussed above:
57+
58+
- Select a suggested question. Copilot's suggested questions are contextual. For example, questions about resources appear on the resources page, and questions about distributed traces appear on the traces page.
59+
- Enter your own question in the chat input field, such as `Why did the product cache fail to start?` or `What caused recent errors in the frontend?`
60+
61+
The dashboard also includes a Copilot option in the context menus for resources, structured logs, traces, and spans. Select **Ask GitHub Copilot** to investigate the selected data.
62+
63+
:::image type="content" source="media/copilot/resources-askcopilot.png" lightbox="media/copilot/resources-askcopilot.png" alt-text="A screenshot of the Ask GitHub Copilot option in the resource context menu page.":::
64+
65+
If your app has structured logs or traces with errors, an **Explain errors** button appears on those pages. Selecting it makes all errors available to Copilot for investigation.
66+
67+
:::image type="content" source="media/copilot/structuredlogs-explainerror.png" lightbox="media/copilot/structuredlogs-explainerror.png" alt-text="A screenshot of the structured logs page with an Explain errors button.":::
68+
69+
On the trace details page, the **Explain trace** button is always visible. It provides a quick way to analyze the currently viewed trace.
70+
71+
:::image type="content" source="media/copilot/tracedetails-explaintrace.png" lightbox="media/copilot/tracedetails-explaintrace.png" alt-text="A screenshot of the trace details page with an Explain trace button.":::
72+
73+
## Troubleshooting
74+
75+
### Copilot hangs on "Getting ready"
76+
77+
A known issue can cause the Copilot UI to hang with a "Getting ready" message when it is first accessed. This occurs when the dashboard is not launched from a [supported version](#requirements) of Visual Studio or VS Code, or when no GitHub account is logged into the IDE. Closing and reopening the Copilot UI fixes the issue. Once fixed, the UI correctly displays a message with requirements for using the dashboard with GitHub Copilot.
78+
79+
### Reached monthly limit of Copilot Free plan
80+
81+
The GitHub Copilot Free plan includes a monthly limit on chat usage. When this limit is exceeded, Copilot will no longer function in the dashboard. [Upgrade your Copilot subscription](https://aka.ms/dotnet/aspire/copilot-pro) or wait for the limit to reset.
82+
83+
## Limitations
84+
85+
### Data size
86+
87+
AI models have limits on how much data they can process at once. The .NET Aspire dashboard may limit the amount of data sent to GitHub Copilot when necessary.
88+
89+
- Large data fields (e.g., long exception stack traces) may be truncated.
90+
- Requests involving large collections of telemetry may be shortened by omitting older items.
91+
92+
## Disable GitHub Copilot in the dashboard
93+
94+
GitHub Copilot only accesses data when you explicitly interact with it. For example, submitting a chat query or selecting **Ask GitHub Copilot** from a context menu.
95+
96+
If you prefer to disable the feature entirely, set the `ASPIRE_DASHBOARD_AI_DISABLED` environment variable to `true` in your app host's _launchSettings.json_ file. This hides all Copilot UI elements in the dashboard.
97+
98+
:::code language="json" source="snippets/DisableAI/AspireApp/AspireApp.AppHost/Properties/launchSettings.json" highlight="14":::
99+
100+
## GitHub Copilot frequently asked questions
101+
102+
For more information about GitHub Copilot, such as questions around plans, privacy and responsible AI usage, see the [GitHub Copilot frequently asked questions](https://github.com/features/copilot#faq).
136 KB
Loading
107 KB
Loading
50.7 KB
Loading
103 KB
Loading
80.7 KB
Loading

docs/fundamentals/dashboard/microsoft-collected-dashboard-telemetry.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The .NET Aspire dashboard doesn't collect telemetry on Visual Studio versions `<
5959
| 9.3 | Resource restart times. ||
6060
| 9.3 | OTel data processing times. ||
6161
| 9.3 | Dashboard-related unhandled exceptions. ||
62+
| 9.3 | GitHub Copilot usage statistics. ||
63+
| 9.3 | GitHub Copilot help/unhelp feedback. ||
6264

6365
## See also
6466

docs/fundamentals/dashboard/overview.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ ms.topic: reference
77

88
# .NET Aspire dashboard overview
99

10-
[.NET Aspire](../../get-started/aspire-overview.md) project templates offer a sophisticated dashboard for comprehensive app monitoring and inspection, and it's also available in [standalone mode](#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. The dashboard exposes the ability to [stop, start, and restart resources](explore.md#resource-actions), as well as view and interact with logs and telemetry.
10+
[.NET Aspire](../../get-started/aspire-overview.md) project templates include a sophisticated dashboard for comprehensive app monitoring and inspection. The dashboard is also available in [standalone mode](#standalone-mode).
11+
12+
The dashboard enables real-time tracking of key aspects of your app, including logs, traces, and environment configurations. It's designed to enhance the development experience by providing a clear and insightful view of your app's state and structure.
13+
14+
Key features of the dashboard include:
15+
16+
- Real-time tracking of logs, traces, and environment configurations.
17+
- User interface to [stop, start, and restart resources](explore.md#resource-actions).
18+
- Collects and displays logs and telemetry; [view structured logs, traces, and metrics](explore.md#monitoring-pages) in an intuitive UI.
19+
- Enhanced debugging with [GitHub Copilot](copilot.md), your AI-powered assistant built into the dashboard.
1120

1221
## Use the dashboard with .NET Aspire projects
1322

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\AspireApp.ServiceDefaults\AspireApp.ServiceDefaults.csproj" />
11+
</ItemGroup>
12+
13+
</Project>

0 commit comments

Comments
 (0)