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:
- Open the
<wavefront_config_path>
/log4j2.xml
file. -
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>
Note: See the log4j2 documentation for information on each parameter. -
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>
- 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.