Skip to content

sgryphon/essential-opentelemetry

Repository files navigation

Essential OpenTelemetry

Essential .NET OpenTelemetry

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.

Build codecov

Getting started with the Colored Console exporter

  1. Install the ColoredConsole NuGet package via dotnet or another package manager:
dotnet add package Essential.OpenTelemetry.Exporter.ColoredConsole
  1. Add the following using statements:
using Essential.OpenTelemetry;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
  1. 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.

Documentation

New to OpenTelemetry? Check out our Getting Started Guide for a walk through for setting up OpenTelemetry logging.

Or for a simple example application, just clone this repository (with submodules) and run:

dotnet run --project .\examples\SimpleConsole --framework net10.0

The example supports earlier frameworks, e.g. if you are still using net8.0.

For more details on the project see the Development instructions.

Earlier related projects

For earlier generations of .NET diagnostics frameworks, see the related projects:

License

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/.

About

Exporters and other extensions for .NET OpenTelemetry

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors