Serilog.Enrichers.Span 2.0.0

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 | Mac | ||
| Azure Pipelines | Windows | ||
| Azure Pipelines | Overall | ||
| GitHub Actions | Ubuntu, Mac & Windows | ||
| AppVeyor | Ubuntu, Mac & Windows |
Contributions and Thanks
Please view the contributing guide for more information.
Showing the top 20 packages that depend on Serilog.Enrichers.Span.
| Packages | Downloads |
|---|---|
|
SanedBuildingBlocks
This package built for OIG-Saned
|
3,378 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
2,351 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
908 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
831 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
740 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
643 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
449 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
419 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
274 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
266 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
189 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
184 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
182 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
123 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
118 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
115 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
112 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
108 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
101 |
|
SanedBuildingBlocks
This package built for OIG-Saned
|
92 |
https://github.com/RehanSaeed/Serilog.Enrichers.Span/releases
.NET Framework 4.7.2
- Serilog (>= 2.8.0)
- System.Diagnostics.DiagnosticSource (>= 6.0.0)
.NET Core 3.1
- Serilog (>= 2.8.0)
- System.Diagnostics.DiagnosticSource (>= 6.0.0)
.NET 5.0
- Serilog (>= 2.8.0)
- System.Diagnostics.DiagnosticSource (>= 6.0.0)
.NET 6.0
- Serilog (>= 2.8.0)
- System.Diagnostics.DiagnosticSource (>= 6.0.0)