Oakrey.Applications.Telemetry 2.0.6

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

Oakrey.Applications.Telemetry

A Windows .NET library providing pre-configured OpenTelemetry TracerProvider factories for Console and Seq (OTLP/HTTP) backends, with HTTP client instrumentation and a DI extension for registering a Seq trace provider.

NuGet package ID: Oakrey.Applications.Telemetry

Main features

  • TracerProviders.ConsoleTraceProvider(sourceName) � builds a TracerProvider that exports traces to the console
  • TracerProviders.SeqTraceProvider(sourceName) � builds a TracerProvider that exports to Seq via OTLP/HTTP (localhost:5341) and to the console, with HttpClient instrumentation enabled
  • AddSeqTraceProvider(IServiceCollection, sourceName) DI extension � registers the Seq provider as a singleton
  • Service resource metadata automatically set to sourceName in all providers
  • Hardcoded Seq endpoint: http://localhost:5341/ingest/otlp/v1/traces (OTLP HTTP/Protobuf)

Architecture

classDiagram
    class TracerProviders {
        +ConsoleTraceProvider(sourceName) TracerProvider
        +SeqTraceProvider(sourceName) TracerProvider
        -AddSeqExporter(builder) TracerProviderBuilder
    }

    class TelemetryConfigurationExtensions {
        +AddSeqTraceProvider(services, sourceName) IServiceCollection
    }

    TelemetryConfigurationExtensions --> TracerProviders : calls SeqTraceProvider

Project files

File Purpose
TracerProviders.cs Static factory methods for ConsoleTraceProvider and SeqTraceProvider
TelemetryConfigurationExtensions.cs IServiceCollection extension to register the Seq provider

Requirements

  • .NET 10 (Windows only � net10.0-windows)
  • A running Seq instance on localhost:5341 when using the Seq provider

Dependencies

Package Version
Microsoft.Extensions.DependencyInjection 10.0.8
OpenTelemetry 1.15.3
OpenTelemetry.Exporter.Console 1.15.3
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.15.3
OpenTelemetry.Instrumentation.AspNetCore 1.15.2
OpenTelemetry.Instrumentation.Http 1.15.1

Installation

NuGet Package Manager

  1. Open your project in Visual Studio.
  2. Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
  3. Search for Oakrey.Applications.Telemetry and click Install.

.NET CLI

dotnet add package Oakrey.Applications.Telemetry

Package Manager Console

Install-Package Oakrey.Applications.Telemetry

Configuration

The Seq OTLP endpoint is hardcoded to http://localhost:5341/ingest/otlp/v1/traces. No external configuration file is required. To target a different Seq instance, call TracerProviders.SeqTraceProvider is not directly configurable from outside � see Development notes below.

Example usage

Console exporter only

using OpenTelemetry.Trace;
using Oakrey.Applications.Telemetry;

TracerProvider provider = TracerProviders.ConsoleTraceProvider("MyApplication");

ActivitySource source = new("MyApplication");
using Activity? activity = source.StartActivity("DoWork");
activity?.SetTag("key", "value");

Seq exporter with HTTP client instrumentation

using OpenTelemetry.Trace;
using Oakrey.Applications.Telemetry;

TracerProvider provider = TracerProviders.SeqTraceProvider("MyApplication");

Dependency Injection registration

using Oakrey.Applications.Telemetry;

IServiceCollection services = new ServiceCollection();
services.AddSeqTraceProvider("MyApplication");

Development notes

  • The Seq OTLP endpoint (localhost:5341) is hardcoded in TracerProviders.AddSeqExporter. To make it configurable, extract the URI into a parameter or options object.
  • OpenTelemetry.Instrumentation.AspNetCore is listed as a package reference but AddAspNetCoreInstrumentation() is not called anywhere in the current source. It is a transitive dependency only.
  • TracerProvider implements IDisposable. Providers created via the static factories must be disposed by the caller when the application exits.
  • Both ConsoleTraceProvider and SeqTraceProvider call .Build() immediately � they are not lazy.

License

MIT - Copyright (c) Oakrey 2016-present

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Oakrey.Applications.Telemetry:

Package Downloads
Oakrey.Applications.Base

A foundational .NET library for building modular WPF applications. Provides application lifecycle management, MVVM ViewModel resolution, structured logging, telemetry, and sequential or parallel service preloading with full unhandled-exception coverage.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.6 109 5/15/2026
2.0.5 120 3/13/2026
2.0.1 132 2/11/2026
2.0.0 448 11/18/2025
1.0.2 257 9/29/2025
1.0.1 325 8/6/2025
1.0.0 283 4/17/2025