AspireDashboardHelper 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package AspireDashboardHelper --version 1.0.5                
NuGet\Install-Package AspireDashboardHelper -Version 1.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AspireDashboardHelper" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspireDashboardHelper --version 1.0.5                
#r "nuget: AspireDashboardHelper, 1.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AspireDashboardHelper as a Cake Addin
#addin nuget:?package=AspireDashboardHelper&version=1.0.5

// Install AspireDashboardHelper as a Cake Tool
#tool nuget:?package=AspireDashboardHelper&version=1.0.5                

Aspire Dashboard Helper

The Aspire Dashboard Helper is a library that helps you to add OpenTelemetry to your application and send the data to an Aspire Dashboard running via docker.

Add the following code to your program.cs file

var sName = "Application Name";
builder.AddCommonOTelLogging(() => ResourceBuilder.CreateDefault().AddService($"{sName} {builder.Configuration.GetValue<string>("env")}"));
builder.AddCommonOTelMonitoring($"{sName} {builder.Configuration.GetValue<string>("env")}", builder.Configuration.GetValue<string>("BuildNumber"), sName);
builder.AddOldOpenTel();

Add the following settings to your appsettings.json file

"AspireDashboard": "http://localhost:18889/",//The URL to send data to the Aspire Dashboard
"env": "Dev",//The environment of your application eg Dev, Test, Prod etc
"BuildNumber": "",//The build or version number of your application

To run the Aspire Dashboard from a docker compose file you can use the following code

  aspire-dashboard:
    image: mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.5
    container_name: aspire-dashboard
    expose:
      - "18888"
      - "18889"
    ports:
      - 18889:18889
  • localhost:18888 will be the URL of the Aspire Dashboard
  • localhost:18889 will be the URL your application uses to send OpenTelemetry data to the Aspire Dashboard

An example of how to use the Aspire Dashboard can be found https://learn.microsoft.com/en-us/samples/dotnet/aspire-samples/aspire-standalone-dashboard/

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.13 86 9/15/2024
1.0.12 71 7/12/2024
1.0.11 173 6/19/2024
1.0.10 74 6/18/2024
1.0.9 86 6/15/2024
1.0.8 245 5/19/2024
1.0.7 64 5/18/2024
1.0.6 821 4/8/2024
1.0.5 69 4/7/2024
1.0.4 216 4/3/2024
1.0.3 70 4/3/2024
1.0.2 86 4/3/2024
1.0.0 92 4/3/2024