AStarDev.LoggingOTel 0.1.0

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

AStarDev.LoggingOTel

OpenTelemetry logging configuration helper: console exporter + Azure Monitor (Application Insights) log exporter, driven by IConfigurationRoot.

NuGet License: MIT


Installation

dotnet add package AStarDev.LoggingOTel

Or via the NuGet Package Manager in Visual Studio / Rider.


Available extensions

ILoggingBuilder.ConfigureOTelLogging(configuration, connectionStringConfigurationKey = "ApplicationInsights:ConnectionString")

Wires up OpenTelemetry logging that:

  • writes to the console
  • exports to Azure Monitor when a connection string is present at connectionStringConfigurationKey in the supplied IConfigurationRoot
  • includes formatted messages, scopes, and structured state values

An overload additionally accepts an InMemoryLogProcessor, routing log records to it as well — used for the in-app log viewer feature (AStarDev.LoggingOTel.LogViewer).


Build

This package lives inside the astar-dev-mono mono-repo and inherits all build configuration from the root Directory.Build.props.

# From the repo root — builds everything
dotnet build

# Build only this package
dotnet build packages/core/logging/AStarDev.LoggingOTel

# If Directory.Build.props changes aren't being picked up
dotnet clean && dotnet build packages/core/logging/AStarDev.LoggingOTel

Test

Tests for this package live alongside it in AStarDev.LoggingOTel.TestsUnit.

# Run all tests
dotnet test

# Run tests for this package specifically
dotnet test packages/core/logging/AStarDev.LoggingOTel.TestsUnit

Contributing

  1. Fork the repo and create a branch: feat/logging-otel-<short-description> or fix/logging-otel-<short-description>.
  2. Follow the Conventional Commits format — e.g. feat(packages/core/logging/AStarDev.LoggingOTel): add XyzExtensions.
  3. All warnings are treated as errors (TreatWarningsAsErrors=true), so the build must stay clean.
  4. Add or update the relevant doc file under docs/ if you add a new extension or change an existing one.
  5. Open a PR against main. CI runs automatically on push.

Do not run dotnet pack or dotnet nuget push manually — releases are triggered by pushing a v* tag. See the repo-level Releasing a new version guide.

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

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
0.1.0 146 8/26/2026

Initial release.