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
<PackageReference Include="IronAlpine.Observability.OpenTelemetry" Version="2.0.0" />
<PackageVersion Include="IronAlpine.Observability.OpenTelemetry" Version="2.0.0" />
<PackageReference Include="IronAlpine.Observability.OpenTelemetry" />
paket add IronAlpine.Observability.OpenTelemetry --version 2.0.0
#r "nuget: IronAlpine.Observability.OpenTelemetry, 2.0.0"
#:package IronAlpine.Observability.OpenTelemetry@2.0.0
#addin nuget:?package=IronAlpine.Observability.OpenTelemetry&version=2.0.0
#tool nuget:?package=IronAlpine.Observability.OpenTelemetry&version=2.0.0
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:
- configured value
- explicit method parameter
- entry assembly name
- 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
IEventMetadataProviderexists
Metadata Enrichment
When the host also registers an IEventMetadataProvider, the package writes:
correlation.idcausation.idtenant.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
EnablePrometheusScrapingEndpointtotrue - 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.AspNetCorein HTTP services - verify metadata provider registration
| Product | Versions 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. |
-
net10.0
- IronAlpine.Framework.Abstractions (>= 2.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.12.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.12.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.12.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.12.0-beta.2)
- OpenTelemetry.Instrumentation.Http (>= 1.12.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.12.0)
-
net9.0
- IronAlpine.Framework.Abstractions (>= 2.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.12.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.12.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.12.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.12.0-beta.2)
- OpenTelemetry.Instrumentation.Http (>= 1.12.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Stable mediator release with request/response, notification publish strategies, streaming, and dependency injection integration.