Hugo.Diagnostics.OpenTelemetry
2.0.0
dotnet add package Hugo.Diagnostics.OpenTelemetry --version 2.0.0
NuGet\Install-Package Hugo.Diagnostics.OpenTelemetry -Version 2.0.0
<PackageReference Include="Hugo.Diagnostics.OpenTelemetry" Version="2.0.0" />
<PackageVersion Include="Hugo.Diagnostics.OpenTelemetry" Version="2.0.0" />
<PackageReference Include="Hugo.Diagnostics.OpenTelemetry" />
paket add Hugo.Diagnostics.OpenTelemetry --version 2.0.0
#r "nuget: Hugo.Diagnostics.OpenTelemetry, 2.0.0"
#:package Hugo.Diagnostics.OpenTelemetry@2.0.0
#addin nuget:?package=Hugo.Diagnostics.OpenTelemetry&version=2.0.0
#tool nuget:?package=Hugo.Diagnostics.OpenTelemetry&version=2.0.0
Hugo.Diagnostics.OpenTelemetry
Hugo ships a batteries-included OpenTelemetry integration so your apps can publish metrics and traces for channels, wait groups, task queues, deterministic workflows, and result pipelines with one registration call. This package wires GoDiagnostics into .NET telemetry builders, exports schema-aware instruments, and enables rate-limited sampling that keeps high-volume workloads observable without drowning tracing backends.
Features
- One-line registration for Hugo meters and activity sources via
AddHugoDiagnostics. - Opinionated defaults for OTLP (gRPC/HTTP) and Prometheus exporters that match Aspire ServiceDefaults.
- Optional console exporters and runtime instrumentation for rapid local debugging.
- Rate-limited activity sampling so channel-heavy workloads remain traceable.
- Hooks for customizing samplers, metric views, and exporter pipelines.
Install
dotnet add package Hugo.Diagnostics.OpenTelemetry
Quick start
using Hugo.Diagnostics.OpenTelemetry;
using Microsoft.Extensions.Hosting;
using OpenTelemetry.Trace;
var builder = Host.CreateApplicationBuilder(args);
var otel = builder.Services.AddOpenTelemetry()
.AddHugoDiagnostics(options =>
{
options.ServiceName = builder.Environment.ApplicationName;
options.OtlpEndpoint = new Uri("http://localhost:4317");
options.AddPrometheusExporter = true;
options.MaxActivitiesPerInterval = 64;
});
otel.WithTracing(tracing =>
{
tracing.SetSampler(new TraceIdRatioBasedSampler(0.25));
tracing.AddConsoleExporter();
});
otel.WithMetrics(metrics =>
{
metrics.AddConsoleExporter();
});
var app = builder.Build();
await app.RunAsync();
Configuration highlights
ServiceName,SchemaUrl, and meter/activity names default to Hugo’s telemetry conventions.- Toggle OTLP exporters (
options.OtlpEndpoint,options.OtlpProtocol) or Prometheus scraping (options.AddPrometheusExporter). - Enable or disable rate-limited sampling (
options.EnableRateLimitedSampling,options.MaxActivitiesPerInterval,options.SamplingInterval). - Add runtime instrumentation (
options.AddRuntimeInstrumentation) for GC/ThreadPool counters alongside Hugo metrics.
Documentation
Need help or have feedback? Open an issue at github.com/df49b9cd/Hugo.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Hugo (>= 2.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.14.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.14.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.14.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.14.0)
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 |
|---|---|---|
| 2.0.0 | 289 | 11/21/2025 |
| 2.0.0-rc.7 | 311 | 11/21/2025 |
| 2.0.0-rc.6 | 355 | 11/18/2025 |
| 2.0.0-rc.5 | 353 | 11/18/2025 |
| 1.4.11 | 176 | 11/14/2025 |
| 1.4.10 | 231 | 11/13/2025 |
| 1.4.9 | 238 | 11/12/2025 |
| 1.4.8 | 228 | 11/10/2025 |
| 1.4.7 | 219 | 11/10/2025 |
| 1.4.5 | 217 | 11/10/2025 |
| 1.4.4 | 160 | 11/9/2025 |
| 1.4.3 | 164 | 11/9/2025 |
| 1.4.2 | 149 | 10/30/2025 |
| 1.4.1 | 156 | 10/30/2025 |
| 1.4.0 | 149 | 10/27/2025 |
| 1.3.6 | 149 | 10/27/2025 |
| 1.3.5 | 137 | 10/26/2025 |
| 1.3.4 | 129 | 10/26/2025 |
| 1.3.3 | 98 | 10/25/2025 |
| 1.3.2 | 103 | 10/25/2025 |
| 1.3.0 | 64 | 10/25/2025 |
| 1.1.0 | 109 | 10/24/2025 |
| 1.0.2 | 130 | 10/23/2025 |
| 1.0.1 | 140 | 10/23/2025 |
| 1.0.0 | 137 | 10/21/2025 |
| 0.5.8 | 142 | 10/21/2025 |
| 0.5.7 | 140 | 10/21/2025 |