Guidance, additional exporters, and other extensions for OpenTelemetry .NET.
Currently this consists of a ColoredConsoleExporter that allows you to use OpenTelemetry from day one when building your project.
This exporter comfortably replaces the default console logging, and allows you to access the benefits of OpenTelemetry instrumentation libraries and standardised distributed tracing.
OpenTelemetry is widely supported by many diagnostics and application performance management providers — this project brings that to your development console.
- Install the ColoredConsole NuGet package via
dotnetor another package manager:
dotnet add package Essential.OpenTelemetry.Exporter.ColoredConsole- Add the following using statements:
using Essential.OpenTelemetry;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;- In your host services, clear the default loggers and configure OpenTelemetry with the colored console exporter:
builder.Logging.ClearProviders();
builder.Services.AddOpenTelemetry()
.WithLogging(logging =>
{
logging.AddColoredConsoleExporter();
});Existing logging will then output using OpenTelemetry, and you can continue development knowing that your application has access to the entire OpenTelemetry ecosystem.
New to OpenTelemetry? Check out our Getting Started Guide for a walk through for setting up OpenTelemetry logging.
- Getting Started - New to OpenTelemetry? Check out our walk through guide.
- Logging Levels - How to use logging levels.
- Event IDs - How to use events.
- Performance Testing - Performance benchmarks and comparisons.
Or for a simple example application, just clone this repository (with submodules) and run:
dotnet run --project .\examples\SimpleConsole --framework net10.0The example supports earlier frameworks, e.g. if you are still using net8.0.
For more details on the project see the Development instructions.
For earlier generations of .NET diagnostics frameworks, see the related projects:
- Essential Logging, for Microsoft.Extensions.Logging: https://github.com/sgryphon/essential-logging
- Essential Diagnostics, for System.Diagnostics: https://github.com/sgryphon/essential-diagnostics
Copyright (C) 2026 Gryphon Technology Pty Ltd
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License and GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.
