Learn how to enable debug logs to troubleshoot the OpenTelemetry data.

Follow the steps below to enable debug logs for the OpenTelemetry trace data sent to the Wavefront proxy:

  1. Open the <wavefront_config_path>/log4j2.xml file.
  2. Add the configurations to enable and manage logs under <Appenders>.
    Example:

     <Appenders>
        <RollingFile name="OTLPDataFile" fileName="${log-path}/wavefront-otlp-data.log" filePattern="${log-path}/wavefront-otlp-data-%d{yyyy-MM-dd}-%i.log">
          	<PatternLayout>
              <pattern>%m%n</pattern>
          	</PatternLayout>
          	<Policies>
              <TimeBasedTriggeringPolicy interval="1" />
              <SizeBasedTriggeringPolicy size="100 MB" />
          	</Policies>
          	<DefaultRolloverStrategy max="10">
              <Delete basePath="${log-path}" maxDepth="1">
                 <IfFileName glob="wavefront-otlp-data-*.log" />
                	<IfLastModified age="7d" />
              </Delete>
          	</DefaultRolloverStrategy>
        </RollingFile>
     </Appenders>
    
  3. Add the logger name for OTLPDataLogger inside <Loggers>.
    Example:

       <!-- Set level="ALL" to log OpenTelemetry/OTLP data to a file. -->
       <Loggers>
          <AsyncLogger name="OTLPDataLogger" level="ALL" additivity="false">
             <AppenderRef ref="OTLPDataFile" />
          </AsyncLogger>
       </Loggers>
    
  4. Save the file.

Once the proxy debug logs are saved, you can see them in the directory you specified for log-path on your log4j2.xml file.