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
                    
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="Hugo.Diagnostics.OpenTelemetry" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hugo.Diagnostics.OpenTelemetry" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Hugo.Diagnostics.OpenTelemetry" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hugo.Diagnostics.OpenTelemetry --version 2.0.0
                    
#r "nuget: Hugo.Diagnostics.OpenTelemetry, 2.0.0"
                    
#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.
#:package Hugo.Diagnostics.OpenTelemetry@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hugo.Diagnostics.OpenTelemetry&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Hugo.Diagnostics.OpenTelemetry&version=2.0.0
                    
Install as a Cake Tool

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 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. 
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
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