AStarDev.LoggingOTel
0.1.0
dotnet add package AStarDev.LoggingOTel --version 0.1.0
NuGet\Install-Package AStarDev.LoggingOTel -Version 0.1.0
<PackageReference Include="AStarDev.LoggingOTel" Version="0.1.0" />
<PackageVersion Include="AStarDev.LoggingOTel" Version="0.1.0" />
<PackageReference Include="AStarDev.LoggingOTel" />
paket add AStarDev.LoggingOTel --version 0.1.0
#r "nuget: AStarDev.LoggingOTel, 0.1.0"
#:package AStarDev.LoggingOTel@0.1.0
#addin nuget:?package=AStarDev.LoggingOTel&version=0.1.0
#tool nuget:?package=AStarDev.LoggingOTel&version=0.1.0
AStarDev.LoggingOTel
OpenTelemetry logging configuration helper: console exporter + Azure Monitor (Application Insights) log exporter, driven by IConfigurationRoot.
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
connectionStringConfigurationKeyin the suppliedIConfigurationRoot - 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
- Fork the repo and create a branch:
feat/logging-otel-<short-description>orfix/logging-otel-<short-description>. - Follow the Conventional Commits format — e.g.
feat(packages/core/logging/AStarDev.LoggingOTel): add XyzExtensions. - All warnings are treated as errors (
TreatWarningsAsErrors=true), so the build must stay clean. - Add or update the relevant doc file under
docs/if you add a new extension or change an existing one. - 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 | Versions 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. |
-
net10.0
- Azure.Monitor.OpenTelemetry.Exporter (>= 1.8.3)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Identity.Client (>= 4.87.0)
- Microsoft.Identity.Client.Extensions.Msal (>= 4.87.0)
- OpenTelemetry (>= 1.17.0)
- OpenTelemetry.Api (>= 1.17.0)
- OpenTelemetry.Exporter.Console (>= 1.17.0)
- System.Reactive (>= 7.0.0)
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.