You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [Aspire dashboard](https://learn.microsoft.com/dotnet/aspire/fundamentals/dashboard/overview) is a standalone tool for viewing the logs, traces, and metrics that your apps emit over the OpenTelemetry Protocol (OTLP). It provides a web interface to explore telemetry during local development.
4
+
5
+
Add the following dependency to your project file:
6
+
7
+
```shell title="NuGet"
8
+
dotnet add package Testcontainers.AspireDashboard
9
+
```
10
+
11
+
You can start an Aspire Dashboard container instance from any .NET application. This example uses xUnit.net's `IAsyncLifetime` interface to manage the lifecycle of the container. The container is started in the `InitializeAsync` method before the test method runs, ensuring that the environment is ready for testing. After the test completes, the container is removed in the `DisposeAsync` method.
The test example exports a trace to the dashboard over OTLP and queries the dashboard's telemetry API to confirm that the span was ingested. Use `GetOtlpGrpcAddress()` or `GetOtlpHttpAddress()` to configure the OpenTelemetry exporter in your .NET service, and `GetDashboardAddress()` to open the dashboard's web interface.
19
+
20
+
The test example uses the following NuGet dependencies:
[Obsolete("This constant is obsolete and will be removed in the future. Use the constructor with the image parameter instead: https://github.com/testcontainers/testcontainers-dotnet/discussions/1470#discussioncomment-15185721.")]
/// Initializes a new instance of the <see cref="AspireDashboardBuilder" /> class.
18
+
/// </summary>
19
+
[Obsolete("This parameterless constructor is obsolete and will be removed. Use the constructor with the image parameter instead: https://github.com/testcontainers/testcontainers-dotnet/discussions/1470#discussioncomment-15185721.")]
20
+
[ExcludeFromCodeCoverage]
21
+
publicAspireDashboardBuilder()
22
+
:this(AspireDashboardImage)
23
+
{
24
+
}
25
+
26
+
/// <summary>
27
+
/// Initializes a new instance of the <see cref="AspireDashboardBuilder" /> class.
28
+
/// </summary>
29
+
/// <param name="image">
30
+
/// The full Docker image name, including the image repository and tag
0 commit comments