Oakrey.Applications.Telemetry 7.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Oakrey.Applications.Telemetry --version 7.0.0
                    
NuGet\Install-Package Oakrey.Applications.Telemetry -Version 7.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="Oakrey.Applications.Telemetry" Version="7.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oakrey.Applications.Telemetry" Version="7.0.0" />
                    
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 7.0.0
                    
#r "nuget: Oakrey.Applications.Telemetry, 7.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 Oakrey.Applications.Telemetry@7.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=Oakrey.Applications.Telemetry&version=7.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Oakrey.Applications.Telemetry&version=7.0.0
                    
Install as a Cake Tool

Oakrey.Applications.Telemetry

A .NET 10 library providing validated OpenTelemetry TracerProvider factories for console and Seq OTLP/HTTP export.

NuGet package ID: Oakrey.Applications.Telemetry

Main features

  • TracerProviders.ConsoleTraceProvider(sourceName) creates a provider that exports matching activities to the console.
  • TracerProviders.SeqTraceProvider(sourceName) creates a provider that exports matching activities to the local Seq OTLP endpoint.
  • Seq tracing includes HttpClient instrumentation.
  • Both providers attach OpenTelemetry service resource metadata using the validated source name.
  • Provider creation is recorded through placeholder-based Oakrey logging.
  • Invalid, blank, or control-character-containing source names are rejected before configuring telemetry or writing logs.

The Seq provider intentionally does not add a console exporter. This avoids duplicating telemetry and exposing span data through standard output.

Architecture

classDiagram
    class TracerProviders {
        +ConsoleTraceProvider(sourceName) TracerProvider
        +SeqTraceProvider(sourceName) TracerProvider
        -CreateBaseBuilder(sourceName) TracerProviderBuilder
        -NormalizeSourceName(sourceName) string
    }

Requirements

  • .NET 10
  • A running Seq instance on localhost:5341 when using SeqTraceProvider

Direct dependencies

Package Version
Oakrey.Log.Abstractions 3.0.0
OpenTelemetry 1.16.0
OpenTelemetry.Exporter.Console 1.16.0
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.16.0
OpenTelemetry.Instrumentation.Http 1.16.0

The unused OpenTelemetry.Instrumentation.AspNetCore dependency is not included.

Installation

dotnet add package Oakrey.Applications.Telemetry

Package Manager Console:

Install-Package Oakrey.Applications.Telemetry

Usage

Console exporter

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

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

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

Seq exporter

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

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

The source name passed to the provider must match the ActivitySource name whose activities should be collected.

Security and lifecycle notes

  • The built-in Seq endpoint is http://localhost:5341/ingest/otlp/v1/traces.
  • Plain HTTP is limited to the local loopback endpoint. Do not forward this endpoint over an untrusted network.
  • Span attributes can contain sensitive application data. Review tags added by application code and HTTP instrumentation before enabling export.
  • TracerProvider implements IDisposable; dispose every provider during application shutdown so pending telemetry can be flushed.
  • Provider construction failures are logged without span contents and are rethrown to the caller.
  • A configurable or remote Seq endpoint would require a new public API and is intentionally not introduced by this change.

License

MIT - Copyright (c) Oakrey 2016-present

Product Compatible and additional computed target framework versions.
.NET 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 (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
7.0.1 39 8/6/2026
7.0.0 122 7/20/2026
2.0.7 119 7/3/2026
2.0.6 136 5/15/2026
2.0.5 133 3/13/2026
2.0.1 147 2/11/2026
2.0.0 461 11/18/2025
1.0.2 271 9/29/2025
1.0.1 340 8/6/2025
1.0.0 298 4/17/2025