AspireDashboardHelper 1.0.10
See the version list below for details.
dotnet add package AspireDashboardHelper --version 1.0.10
NuGet\Install-Package AspireDashboardHelper -Version 1.0.10
<PackageReference Include="AspireDashboardHelper" Version="1.0.10" />
paket add AspireDashboardHelper --version 1.0.10
#r "nuget: AspireDashboardHelper, 1.0.10"
// Install AspireDashboardHelper as a Cake Addin #addin nuget:?package=AspireDashboardHelper&version=1.0.10 // Install AspireDashboardHelper as a Cake Tool #tool nuget:?package=AspireDashboardHelper&version=1.0.10
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 | Versions 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. |
-
net8.0
- Azure.Monitor.OpenTelemetry.AspNetCore (>= 1.2.0)
- DotNet.ReproducibleBuilds (>= 1.1.1)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.9.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.0.0-beta.12)
- SharpAbp.Abp.OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 3.3.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.