Skip to content

Commit

Permalink
docs: add ifeval for 7.10 release (elastic#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorelli25 committed Nov 4, 2020
1 parent d737de4 commit a6391d2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/log-correlation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ endif::[]
[[log-correlation]]
== Log correlation


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:

Expand All @@ -20,7 +19,12 @@ If your favorite logging framework is not already supported, there are two other

Regardless of how you integrate APM with logging, you can use {filebeat-ref}[Filebeat] to
send your logs to Elasticsearch, in order to correlate your traces and logs and link from
ifeval::["{branch}"=="7.9"]
APM to the {apm-app-ref}/xpack-logs.html[Logs app].
endif::[]
ifeval::["{branch}"!="7.9"]
APM to the {observability-guide}/monitor-logs.html[Logs app].
endif::[]

[[serilog]]
=== Serilog
Expand Down Expand Up @@ -67,7 +71,7 @@ With this setup the application will send all the logs automatically to Elastics
[[nlog]]
=== NLog

For NLog, we offer two https://github.com/NLog/NLog/wiki/Layout-Renderers[LayoutRenderers] that inject the current trace and transaction id into logs.
For NLog, we offer two https://github.com/NLog/NLog/wiki/Layout-Renderers[LayoutRenderers] that inject the current trace and transaction id into logs.

In order to use them, you need to add the https://www.nuget.org/packages/Elastic.Apm.NLog[Elastic.Apm.NLog] NuGet package to your application and load it in the `<extensions>` section of your NLog config file:

Expand Down Expand Up @@ -109,7 +113,7 @@ For correlating structured logs with traces, the following fields should be adde

- `trace.id`
- `transaction.id`

Given a transaction object, you can obtain its trace id by using the `Transaction.TraceId` property and its transaction id by using the `Transaction.Id` property.

You can also use the <<api-current-transaction, Elastic.Apm.Agent.Tracer.CurrentTransaction>> property anywhere in the code to access the currently active transaction.
Expand Down

0 comments on commit a6391d2

Please sign in to comment.