.NET Core API Log correlation not showing in transactions

Hi I'm trying to make log correlation work on my NET Core API.
I'm using NLog following the documentation. I'm getting the traceID and transactionID in the logs in my console and logfile but I have zero logs in any APM Transactions.
What am I missing?

Here is my NLog config

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      internalLogLevel="Off" internalLogFile="nlog-internal.log">

      <add assembly="Elastic.Apm.NLog"/>
      <add assembly="Elastic.CommonSchema.NLog"/>
      <add assembly="NLog.Web.AspNetCore"/>
  <target name="console"
            layout="${ElasticApmTraceId}|${ElasticApmTransactionId}|${ElasticApmSpanId}|${message}" />
    <target type="file" name="logfile" fileName="myfile.txt" >
      <layout type="jsonlayout">
        <attribute name="TraceId" layout="${ElasticApmTraceId}" />
        <attribute name="TransactionId" layout="${ElasticApmTransactionId}" />
        <attribute name="Date" layout="${longdate}" />
        <attribute name="Level" layout="${uppercase:${level}}" />
        <attribute name="Logger" layout="${logger}" />
        <attribute name="Message" layout="${message} ${exception:format=tostring}" />
    <logger name="*" minLevel="Debug" writeTo="Console" />
    <logger name="*" minLevel="Trace" writeTo="logfile" />

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.