![]() |
VOOZH | about |
dotnet add package CasCap.Common.OpenTelemetry --version 4.12.1
NuGet\Install-Package CasCap.Common.OpenTelemetry -Version 4.12.1
<PackageReference Include="CasCap.Common.OpenTelemetry" Version="4.12.1" />
<PackageVersion Include="CasCap.Common.OpenTelemetry" Version="4.12.1" />Directory.Packages.props
<PackageReference Include="CasCap.Common.OpenTelemetry" />Project file
paket add CasCap.Common.OpenTelemetry --version 4.12.1
#r "nuget: CasCap.Common.OpenTelemetry, 4.12.1"
#:package CasCap.Common.OpenTelemetry@4.12.1
#addin nuget:?package=CasCap.Common.OpenTelemetry&version=4.12.1Install as a Cake Addin
#tool nuget:?package=CasCap.Common.OpenTelemetry&version=4.12.1Install as a Cake Tool
Reusable OpenTelemetry configuration with standard metrics, traces, and log exporters via OTLP gRPC, built on top of CasCap.Common.Abstractions and CasCap.Common.Logging.Serilog.
dotnet add package CasCap.Common.OpenTelemetry
Provides a single InitializeOpenTelemetry extension method on WebApplicationBuilder that registers the full OpenTelemetry pipeline (metrics, traces, and logs) with standard ASP.NET Core instrumentations. Configuration is driven by IMetricsConfig — the OTLP endpoint, service name, and metric prefix are all sourced from the application's configuration record.
Target frameworks: net8.0, net9.0, net10.0
| Extension | Description |
|---|---|
OpenTelemetryExtensions.InitializeOpenTelemetry(builder, metricsConfig, connectionMultiplexer, gitMetadata, configureMetrics?, configureTracing?) |
Registers OpenTelemetry metrics, traces, and logs with OTLP gRPC export |
IMetricsConfig.OtlpExporterEndpoint is null — safe for development without an OTEL collector./metrics scraping.Action<MeterProviderBuilder> and Action<TracerProviderBuilder> callbacks for custom histogram views, additional trace sources, etc.The extension reads configuration from any IMetricsConfig implementation:
| Property | Type | Description |
|---|---|---|
MetricNamePrefix |
string |
Meter name and metric prefix (e.g. "haus", "cas") |
OtelServiceName |
string |
OpenTelemetry service name resource attribute |
OtlpExporterEndpoint |
Uri? |
OTLP gRPC endpoint (e.g. http://localhost:4317/). null disables telemetry. |
Minimal (disables telemetry):
{
"AppConfig": {
"MetricNamePrefix": "haus",
"OtelServiceName": "CasCap.App"
}
}
Fully configured:
{
"AppConfig": {
"MetricNamePrefix": "haus",
"OtelServiceName": "CasCap.App",
"OtlpExporterEndpoint": "http://opentelemetry-collector.monitoring.svc:4317"
}
}
| Package | Purpose |
|---|---|
| OpenTelemetry.Exporter.OpenTelemetryProtocol | OTLP gRPC exporter for metrics, traces, and logs |
| OpenTelemetry.Exporter.Prometheus.AspNetCore | Prometheus /metrics endpoint (development) |
| OpenTelemetry.Extensions.Hosting | AddOpenTelemetry() host integration |
| OpenTelemetry.Instrumentation.AspNetCore | HTTP request metrics and traces |
| OpenTelemetry.Instrumentation.Http | Outbound HTTP client traces |
| OpenTelemetry.Instrumentation.Process | CPU and memory utilization metrics |
| OpenTelemetry.Instrumentation.Runtime | GC, thread pool, and assembly metrics |
| OpenTelemetry.Instrumentation.StackExchangeRedis | Redis command traces |
| StackExchange.Redis | Redis connection multiplexer type |
| Project | Purpose |
|---|---|
CasCap.Common.Abstractions |
IMetricsConfig interface |
CasCap.Common.Logging.Serilog |
Serilog fallback warning when endpoint is null |
CasCap.Common.Services |
GitMetadata record for resource attributes |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.