Serilog.Enrichers.Span 2.0.1

This package has a SemVer 2.0.0 package version: 2.0.1+build.213.
Install-Package Serilog.Enrichers.Span -Version 2.0.1
dotnet add package Serilog.Enrichers.Span --version 2.0.1
<PackageReference Include="Serilog.Enrichers.Span" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Enrichers.Span --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Serilog.Enrichers.Span, 2.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Serilog.Enrichers.Span as a Cake Addin
#addin nuget:?package=Serilog.Enrichers.Span&version=2.0.1

// Install Serilog.Enrichers.Span as a Cake Tool
#tool nuget:?package=Serilog.Enrichers.Span&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Banner

Serilog.Enrichers.Span NuGet Package Serilog.Enrichers.Span package in serilog-exceptions feed in Azure Artifacts Serilog.Enrichers.Span NuGet Package Downloads Twitter URL Twitter Follow

Enrich Serilog log events with properties from open telemetry spans using .NET's Activity API.

What Does It Do?

Enriches logs with a spans unique identifier, parent unique identifier and ASP.NET's trace unique identifier.

Getting Started

Add the Serilog.Enrichers.Span Serilog.Enrichers.Span is an add-on to Serilog to log exception details and custom properties that are not output in Exception.ToString().

dotnet add package Serilog.Enrichers.Span

When setting up your logger, add the WithSpan() line like so:

using Serilog;
using Serilog.Enrichers.Span;

ILogger logger = new LoggerConfiguration()
    .Enrich.WithSpan()
    .WriteTo.RollingFile(
        new JsonFormatter(renderMessage: true), 
        @"C:\logs\log-{Date}.txt")    
    .CreateLogger();

Continuous Integration

Name Operating System Status History
Azure Pipelines Ubuntu Azure Pipelines Ubuntu Build Status
Azure Pipelines Mac Azure Pipelines Mac Build Status
Azure Pipelines Windows Azure Pipelines Windows Build Status
Azure Pipelines Overall Azure Pipelines Overall Build Status Azure DevOps Build History
GitHub Actions Ubuntu, Mac & Windows GitHub Actions Status GitHub Actions Build History
AppVeyor Ubuntu, Mac & Windows AppVeyor Build status AppVeyor Build History

Contributions and Thanks

Please view the contributing guide for more information.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Serilog.Enrichers.Span:

Package Downloads
NetCoreCleanArchitecture.WebHosting

Package Description

SparkRoseDigital.Infrastructure

This library should be used for cross-cutting infrastructural concerns: logging, tracing, caching, message broker communication, health checks, email communication.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Serilog.Enrichers.Span:

Repository Stars
Dotnet-Boxed/Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
damikun/trouble-training
FullStack DDD/CQRS with GraphQL workshop including distributed tracing and monitoring. This shows the configuration from React frontend to .Net backend.
philosowaffle/peloton-to-garmin
Convert workout data from Peloton into JSON/TCX/FIT files that can be uploaded to Garmin Connect
Version Downloads Last updated
2.0.1 34,238 11/22/2021
2.0.0 9,641 11/9/2021
1.4.0 121,279 9/7/2021
1.3.0 78,396 8/5/2021
1.2.0 236,903 4/5/2021
1.1.0 91,333 1/6/2021
1.0.1 16,289 11/23/2020
1.0.0 448 11/20/2020