IronAlpine.Observability.OpenTelemetry 2.0.0

dotnet add package IronAlpine.Observability.OpenTelemetry --version 2.0.0
                    
NuGet\Install-Package IronAlpine.Observability.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="IronAlpine.Observability.OpenTelemetry" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IronAlpine.Observability.OpenTelemetry" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IronAlpine.Observability.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 IronAlpine.Observability.OpenTelemetry --version 2.0.0
                    
#r "nuget: IronAlpine.Observability.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 IronAlpine.Observability.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=IronAlpine.Observability.OpenTelemetry&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IronAlpine.Observability.OpenTelemetry&version=2.0.0
                    
Install as a Cake Tool

IronAlpine.Observability.OpenTelemetry

IronAlpine.Observability.OpenTelemetry wires tracing and metrics into IronAlpine services using OpenTelemetry.

It standardizes:

  • W3C trace context
  • ASP.NET Core instrumentation
  • EF Core instrumentation
  • HttpClient instrumentation
  • runtime metrics
  • OTLP export
  • Prometheus scraping
  • IronAlpine metadata enrichment (correlation.id, causation.id, tenant.id)

Why

Use this package when a service needs consistent distributed tracing and metrics without re-implementing OpenTelemetry bootstrap logic.

Install

dotnet add package IronAlpine.Observability.OpenTelemetry

Quick Start

builder.Services.AddIronAlpineTelemetry(builder.Configuration);

var app = builder.Build();
app.UseIronAlpineTelemetry();

Configuration

Configuration root:

{
  "IronAlpine": {
    "Observability": {
      "OpenTelemetry": {
        "ServiceName": "personnel-service",
        "ServiceVersion": "1.1.0",
        "OtlpEndpoint": "http://localhost:4317",
        "EnablePrometheusScrapingEndpoint": true,
        "PrometheusScrapingEndpointPath": "/metrics"
      }
    }
  }
}

Options Deep Dive

ServiceName

  • default resolution order:
    1. configured value
    2. explicit method parameter
    3. entry assembly name
    4. current app domain name
  • best practice: set it explicitly in production for stable telemetry cardinality

ServiceVersion

  • recommended
  • helps correlate deployments and regressions in telemetry backends

OtlpEndpoint

  • required when exporting to an OTLP collector
  • should be explicit per environment

EnablePrometheusScrapingEndpoint

  • default depends on host setup; configure explicitly
  • enable when Prometheus scraping is part of the environment

PrometheusScrapingEndpointPath

  • default commonly /metrics
  • customize only when ingress or gateway routing requires it

What It Registers

  • OpenTelemetry tracing
  • OpenTelemetry metrics
  • ASP.NET Core instrumentation
  • EF Core instrumentation
  • HttpClient instrumentation
  • OTLP exporter when configured
  • Prometheus endpoint support when enabled
  • metadata enrichment processor when IEventMetadataProvider exists

Metadata Enrichment

When the host also registers an IEventMetadataProvider, the package writes:

  • correlation.id
  • causation.id
  • tenant.id

This keeps traces aligned with:

  • web metadata middleware
  • Serilog enrichment
  • messaging headers
  • inbox/outbox records

Combinations

OpenTelemetry + Web.AspNetCore

Recommended for any HTTP API. Web middleware stamps metadata, OpenTelemetry exports it.

OpenTelemetry + Messaging

Recommended for event-driven services so HTTP and Kafka hops share correlation context.

OpenTelemetry + Logging.Serilog

Use both when operators need to pivot from logs to traces using the same correlation values.

Troubleshooting

No traces appear in backend

Cause:

  • OTLP endpoint missing or unreachable
  • exporter not enabled by configuration

Fix:

  • verify OtlpEndpoint
  • verify collector reachability

Prometheus endpoint returns 404

Cause:

  • scraping endpoint not enabled

Fix:

  • set EnablePrometheusScrapingEndpoint to true
  • verify path mapping

correlation.id tag is missing

Cause:

  • no metadata provider in the host
  • web middleware not registered in HTTP services

Fix:

  • use IronAlpine.Web.AspNetCore in HTTP services
  • verify metadata provider registration
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 1,517 4/2/2026
Loading failed

Stable mediator release with request/response, notification publish strategies, streaming, and dependency injection integration.