<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot;dt.trace_sampled: , dt.trace_id: , dt.span_id:&amp;quot;  are getting appended in each property in log in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/234704#M287</link>
    <description>&lt;P&gt;Please note that with the version 7.4 of logstash this workaround is not necessary anymore.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 07:57:51 GMT</pubDate>
    <dc:creator>harald_berger</dc:creator>
    <dc:date>2024-01-18T07:57:51Z</dc:date>
    <item>
      <title>"dt.trace_sampled: , dt.trace_id: , dt.span_id:"  are getting appended in each property in log</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199653#M283</link>
      <description>&lt;P&gt;I have installed one agent in my local and after that i am seeing "dt.trace_sampled: , dt.trace_id: , dt.span_id:" are getting appended in logs.&lt;/P&gt;
&lt;P&gt;I am using logstash for log format&lt;/P&gt;
&lt;P&gt;ex log:&lt;/P&gt;
&lt;P&gt;{"@timestamp":"2022-12-01T17:30:19.403Z","level":"INFO dt.trace_sampled: , dt.trace_id: , dt.span_id: ","service":"Logback-demo dt.trace_sampled: , dt.trace_id: , dt.span_id: ","traceId":" dt.trace_sampled: , dt.trace_id: , dt.span_id: ","spanId":" dt.trace_sampled: , dt.trace_id: , dt.span_id: ","parentSpanId":" dt.trace_sampled: , dt.trace_id: , dt.span_id: ","pid":"22608 dt.trace_sampled: , dt.trace_id: , dt.span_id: ","thread":"main dt.trace_sampled: , dt.trace_id: , dt.span_id: ","class":"c.r.logbackdemo.LogbackDemoApplication dt.trace_sampled: , dt.trace_id: , dt.span_id: ","message":"dt.trace_sampled: , dt.trace_id: , dt.span_id: Starting LogbackDemoApplication using Java 11.0.15 on USHYDRAJESHPR5 with PID 22608 (C:\\Users\\prrajesh\\Downloads\\logback-demo\\logback-demo\\build\\classes\\java\\main started by prrajesh in C:\\Users\\prrajesh\\Documents\\Code Repo\\New folder\\eai-codegen\\eai-codegen)"}&lt;/P&gt;
&lt;P&gt;logback xml configuration :&lt;/P&gt;
&lt;PRE&gt;&amp;lt;&lt;SPAN&gt;springProperty &lt;/SPAN&gt;&lt;SPAN&gt;scope&lt;/SPAN&gt;&lt;SPAN&gt;="context" &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="appName" &lt;/SPAN&gt;&lt;SPAN&gt;source&lt;/SPAN&gt;&lt;SPAN&gt;="spring.application.name"&lt;/SPAN&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;&lt;SPAN&gt;appender &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="JSON_CONSOLE" &lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;="ch.qos.logback.core.ConsoleAppender"&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;    &amp;lt;&lt;SPAN&gt;encoder &lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;      &lt;SPAN&gt;&amp;lt;!--&amp;lt;jsonGeneratorDecorator class="net.logstash.logback.decorate.PrettyPrintingJsonGeneratorDecorator"/&amp;gt;--&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;      &amp;lt;&lt;SPAN&gt;providers&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;&lt;SPAN&gt;timestamp&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                  &amp;lt;&lt;SPAN&gt;timeZone&lt;/SPAN&gt;&amp;gt;UTC&amp;lt;/&lt;SPAN&gt;timeZone&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;/&lt;SPAN&gt;timestamp&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;&lt;SPAN&gt;mdc&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                  &amp;lt;&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;dt.span_id&amp;lt;/&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                  &amp;lt;&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;dt.trace_id&amp;lt;/&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                  &amp;lt;&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;dt.entity.host&amp;lt;/&lt;SPAN&gt;excludeMdcKeyName&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;/&lt;SPAN&gt;mdc&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;&lt;SPAN&gt;pattern&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                  &amp;lt;&lt;SPAN&gt;pattern&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;                      {&lt;BR /&gt;                      "level": "%level",&lt;BR /&gt;                      "service": "${appName:-}",&lt;BR /&gt;                      "traceId": "%X{traceId:-}",&lt;BR /&gt;                      "spanId": "%X{spanId:-}",&lt;BR /&gt;                      "parentSpanId": "%X{parentSpanId:-}",&lt;BR /&gt;                      "pid": "${PID:-}",&lt;BR /&gt;                      "thread": "%thread",&lt;BR /&gt;                      "class": "%logger{40}",&lt;BR /&gt;                      "message": "%message"&lt;BR /&gt;                      }&lt;BR /&gt;                  &amp;lt;/&lt;SPAN&gt;pattern&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;              &amp;lt;/&lt;SPAN&gt;pattern&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;          &amp;lt;&lt;SPAN&gt;stackTrace&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;          &amp;lt;/&lt;SPAN&gt;stackTrace&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;          &amp;lt;/&lt;SPAN&gt;providers&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;    &amp;lt;/&lt;SPAN&gt;encoder&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;  &amp;lt;/&lt;SPAN&gt;appender&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I dont want these new properties to be appended in my logs&lt;BR /&gt;Is there any way to disable this log enrichment from logstash xml instead from dynatrace console&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Dec 2022 09:27:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199653#M283</guid>
      <dc:creator>RajeshPr</dc:creator>
      <dc:date>2022-12-02T09:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: "dt.trace_sampled: , dt.trace_id: , dt.span_id:"  are getting appended in each property in log</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199698#M284</link>
      <description>&lt;P&gt;We have encountered issues with logback's logstash extension in the past whenever there is a custom pattern (as in this case) defined.&lt;/P&gt;&lt;P&gt;In order to resolve your issue, please &lt;STRONG&gt;disable&lt;/STRONG&gt; unstructured log enrichment for this process (via "Settings" - "Preferences" - "OneAgent features" - "&lt;SPAN&gt;Java - Trace/span context enrichment for unstructured logs").&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In order to have your logs enriched with DT spanId and traceId nevertheless, you can adapt your XML configuration file like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;...&lt;BR /&gt;&amp;lt;mdc&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    &amp;lt;includeMdcKeyName&amp;gt;&lt;/SPAN&gt;dt.span_id&lt;SPAN class=""&gt;&amp;lt;/includeMdcKeyName&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    &amp;lt;includeMdcKeyName&amp;gt;&lt;/SPAN&gt;dt.trace_id&lt;SPAN class=""&gt;&amp;lt;/includeMdcKeyName&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    &amp;lt;includeMdcKeyName&amp;gt;&lt;/SPAN&gt;dt.entity.host&lt;SPAN class=""&gt;&amp;lt;/includeMdcKeyName&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;lt;/mdc&amp;gt;&lt;BR /&gt;...&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;Our documentation regarding Logback and logstash will be updated soon.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 09:31:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199698#M284</guid>
      <dc:creator>stefan_hauser</dc:creator>
      <dc:date>2022-12-02T09:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: "dt.trace_sampled: , dt.trace_id: , dt.span_id:"  are getting appended in each property in log</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199701#M285</link>
      <description>&lt;P&gt;is it not supported with custom pattern currently?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 10:12:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199701#M285</guid>
      <dc:creator>RajeshPr</dc:creator>
      <dc:date>2022-12-02T10:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: "dt.trace_sampled: , dt.trace_id: , dt.span_id:"  are getting appended in each property in log</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199705#M286</link>
      <description>&lt;P&gt;Unstructured log enrichment in general is currently unsupported when logstash is used. The updated documentation will point that out.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 10:50:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/199705#M286</guid>
      <dc:creator>stefan_hauser</dc:creator>
      <dc:date>2022-12-02T10:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: "dt.trace_sampled: , dt.trace_id: , dt.span_id:"  are getting appended in each property in log</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/234704#M287</link>
      <description>&lt;P&gt;Please note that with the version 7.4 of logstash this workaround is not necessary anymore.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 07:57:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/quot-dt-trace-sampled-dt-trace-id-dt-span-id-quot-are-getting/m-p/234704#M287</guid>
      <dc:creator>harald_berger</dc:creator>
      <dc:date>2024-01-18T07:57:51Z</dc:date>
    </item>
  </channel>
</rss>

