Syntrony.Logging.OpenTelemetry 1.1.0

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

Syntrony.Logging.OpenTelemetry

Backend-agnostic telemetry (logs, traces, metrics) for Syntrony.Logging, via OpenTelemetry with OTLP export. Not tied to any specific backend — Aspire Dashboard, Azure Application Insights (native OTLP endpoint), or any other OTLP-compatible collector are equally valid; the consuming application decides where to export.

builder.Services.AddSyntrony(options =>
{
    options.UseLogging(log => log
        .UseLog4Net()
        .UseOpenTelemetry(otel =>
        {
            otel.ServiceName    = "my-service";
            otel.ServiceVersion = typeof(Program).Assembly.GetName().Version?.ToString();
            otel.Endpoint       = builder.Configuration["Telemetry:OtlpEndpoint"];
        }));
});

UseOpenTelemetry(this ISyntronyLoggingBuilder, Action<SyntronyTelemetryOptions> configure, double? traceSampleRatio = null)

Never claims the structured-sink slot (RegisterStructuredSink) — composes freely with UseLog4Net() or whichever structured sink is active, since telemetry and structured logging aren't mutually exclusive.

SyntronyTelemetryOptions:

Property Notes
ServiceName Required — throws ArgumentException if left empty.
ServiceVersion Optional, reported to the collector alongside ServiceName.
Endpoint OTLP endpoint. Falls back to the OTEL_EXPORTER_OTLP_ENDPOINT environment variable when null. If neither is set, no exporter is registered — a warning is written once, the application still starts normally.
EnableTraces / EnableMetrics / EnableLogs All true by default; independently toggle each signal.
ConfigureTracing / ConfigureMetrics Escape hatches onto the underlying TracerProviderBuilder / MeterProviderBuilder, for anything this package doesn't wrap.

traceSampleRatio (default 1.0, i.e. 100%) sets the ParentBasedSampler(TraceIdRatioBasedSampler(...)) used for traces — pass a lower value in production to control cost; the default does not vary by environment on its own.

Default instrumentation, added automatically when traces or metrics are enabled: ASP.NET Core and HttpClient (query strings stripped from span attributes). Entity Framework Core instrumentation isn't bundled — its NuGet package (OpenTelemetry.Instrumentation.EntityFrameworkCore) has never shipped a stable release, which broke dotnet pack (NU5104, a stable package can't depend on a prerelease one). Add it yourself via ConfigureTracing if you need it:

otel.ConfigureTracing = tracing => tracing.AddEntityFrameworkCoreInstrumentation();

Dependency on ASP.NET Core's shared framework

OpenTelemetry.Instrumentation.AspNetCore declares a FrameworkReference to Microsoft.AspNetCore.App, and that propagates transitively to this package and to whoever installs it — a worker or console app that only wants OTLP export (traces/metrics/logs without the ASP.NET Core instrumentation) can't use this package as-is. Accepted as a deliberate exception: the real consumer of Syntrony.Logging.OpenTelemetry today is a web service. If a non-web consumer shows up, the escape hatch is to fork this package without OpenTelemetry.Instrumentation.AspNetCore — everything else here has no FrameworkReference.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 was computed.  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
1.1.0 40 10/7/2026
1.0.1 91 9/24/2026
1.0.0 62 9/23/2026