![]() |
VOOZH | about |
dotnet add package Elastic.Apm.SerilogEnricher --version 9.0.0
NuGet\Install-Package Elastic.Apm.SerilogEnricher -Version 9.0.0
<PackageReference Include="Elastic.Apm.SerilogEnricher" Version="9.0.0" />
<PackageVersion Include="Elastic.Apm.SerilogEnricher" Version="9.0.0" />Directory.Packages.props
<PackageReference Include="Elastic.Apm.SerilogEnricher" />Project file
paket add Elastic.Apm.SerilogEnricher --version 9.0.0
#r "nuget: Elastic.Apm.SerilogEnricher, 9.0.0"
#:package Elastic.Apm.SerilogEnricher@9.0.0
#addin nuget:?package=Elastic.Apm.SerilogEnricher&version=9.0.0Install as a Cake Addin
#tool nuget:?package=Elastic.Apm.SerilogEnricher&version=9.0.0Install as a Cake Tool
This enricher adds the transaction id and trace id to every Serilog log message that is created during a transaction.
The .NET assemblies are published to NuGet under the package name Elastic.Apm.SerilogEnricher
var logger = new LoggerConfiguration()
.Enrich.WithElasticApmCorrelationInfo()
.WriteTo.Console(outputTemplate: "[{ElasticApmTraceId} {ElasticApmTransactionId} {ElasticApmSpanId} {Message:lj} {NewLine}{Exception}")
.CreateLogger();
In the code snippet above Enrich.WithElasticApmCorrelationInfo() enables the enricher from this project,
which will set 3 properties for log lines that are created during a transaction:
ElasticApmTraceIdElasticApmTransactionIdElasticApmSpanIdThese two properties are printed to the Console using the outputTemplate parameter, of course they can
be used with any sink, you could consider using a filesystem sink and
Elastic Filebeat for durable and reliable ingestion.
This enricher is also compatible with the
Elastic.CommonSchema.Serilog package.
The prerequisite for this to work is a configured Elastic APM Agent. If the agent is not configured the enricher won't add anything to the logs.
This software is Copyright (c) 2014-2020 by Elasticsearch BV.
This is free software, licensed under: The Apache License Version 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Elastic.Apm.SerilogEnricher:
| Package | Downloads |
|---|---|
|
Sitko.Core.ElasticStack
Sitko.Core is a set of libraries to help build .NET Core applications fast |
|
|
BioEngine.Extra.ElasticStack
Package Description |
|
|
DDPlanet.Logging
Simple logging framework developed for ELK stack based on Serilog providing fully configured logging in just a couple lines of code |
|
|
Nox.Core
Nox Core Library for all kinf of applications: WebApis, UI, etc.. |
|
|
Nox.Monitoring.ElasticApm
Nox Elastic Apm monitoring library |
Showing the top 4 popular GitHub repositories that depend on Elastic.Apm.SerilogEnricher:
| Repository | Stars |
|---|---|
|
damikun/trouble-training
FullStack DDD/CQRS with GraphQL workshop including distributed tracing and monitoring. This shows the configuration from React frontend to .Net backend.
|
|
|
aspose-cells/Aspose.Cells-for-.NET
Aspose.Cells for .NET examples, plugins and showcases
|
|
|
sitkoru/Sitko.Core
Sitko.Core is a set of libraries to help build .NET Core applications fast
|
|
|
gizemcifguvercin/E-News
This project is about how we can send news to related news agency. You can look at Use Case, Architecture, Technical Overview on README file
|
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 1,018,668 | 8/13/2025 |
| 8.19.0 | 216,502 | 8/13/2025 |
| 8.18.2 | 434,114 | 6/27/2025 |
| 8.18.1 | 351,986 | 5/28/2025 |
| 8.18.0 | 26,096 | 5/22/2025 |
| 8.12.3 | 2,503,275 | 11/26/2024 |
| 8.12.2 | 441,666 | 10/22/2024 |
| 8.12.1 | 140,387 | 10/3/2024 |
| 8.12.0 | 41,520 | 9/26/2024 |
| 8.11.1 | 732,733 | 6/10/2024 |
| 8.11.0 | 464,881 | 4/10/2024 |
| 8.6.1 | 2,333,889 | 8/3/2023 |
| 8.6.0 | 769,730 | 5/9/2023 |
| 8.4.0-alpha4 | 2,066 | 3/28/2023 |
| 8.4.0-alpha3 | 1,157 | 3/15/2023 |
| 8.4.0-alpha2 | 8,250 | 3/1/2023 |
| 8.4.0-alpha1 | 569 | 2/20/2023 |
| 1.6.0-alpha1 | 251,018 | 6/2/2021 |
| 1.5.3 | 8,604,947 | 6/1/2021 |
| 1.5.1 | 2,228,783 | 6/3/2020 |