Elastic .NET Agent provides Log correlation. The agent will automaticaly inject correlation IDs that allow navigation between logs, traces and services.
This features is part of Application log ingestion strategies.
ecs-logging-dotnet library can also be used to use the ECS logging format without an APM agent.
ECS .NET logging will always provide log correlation IDs through
System.Diagnostics.Activity. When paired with the APM Agent it will pick up the appropriate service correlation features too.
The Elastic APM .NET agent provides integrations for popular logging frameworks, which take care of injecting trace ID fields into your application’s log records. Currently supported logging frameworks are:
If your favorite logging framework is not already supported, there are two other options: