{"repo":"NLog/NLog.DiagnosticSource","free":true,"listed":false,"github":"https://github.com/NLog/NLog.DiagnosticSource","clone":"git clone https://github.com/NLog/NLog.DiagnosticSource.git","description":"NLog integration with Microsoft Activity TraceId and SpanId","language":"C#","stars":16,"topics":["nlog","nlog-target","csharp","dotnet","opentelemetry","open-telemetry","open-telemetry-csharp"],"license":"BSD-3-Clause","category":"analytics","readme_excerpt":"NLog.DiagnosticSource NLog.DiagnosticSource extends NLog with support for System.Diagnostics.Activity and DiagnosticSource. - ${activity} - NLog ActivityTraceLayoutRenderer for Microsoft Activity Trace - DiagnosticListener - NLog DiagnosticListenerTarget for Microsoft DiagnosticSource How to install 1) Install the package Install-Package NLog.DiagnosticSource or in your csproj: 2) Add to your nlog.config: Alternative register from code using fluent configuration API: How to use ActivityTraceLayoutRenderer The System.Diagnostics.Activity.Current is the .NET abstraction used by OpenTelemetry for distributed tracing. Example of NLog.config file that outputs TraceId information together with each LogEvent by using ${activity} : Property Enum Values - Id : Hierarchical structure identifier that is concatenation of ParentIds - SpanId : Identifier for the current activity (Ex. database activity within current request) - ParentId : Identifier for the parent activity - TraceId : Identifier for the root activity (Request Trace Identifier) - OperationName : Operation name of the current activity - DisplayName : Explicitly assigned activity display name (with fallback to OperationName) - StartTimeUtc : Time when the operation started - Duration : Duration of the operation (formatted as TimeSpan) - DurationMs : Duration of the operation (formatted as TimeSpan.TotalMilliseconds) - Baggage : Collection of key/value pairs that are passed to children of this Activity (Use Format=\"@\" for json-","default_branch":null,"files":null,"tree":[],"storefront":"/r/NLog","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/NLog/NLog.DiagnosticSource/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}