Getting the OpenTelemetry Collector logs
Obtaining logs from the OpenTelemetry Collector is essential for diagnosing issues. You can troubleshoot problems in data collection and processing by configuring log levels and viewing the Collector pod logs.
Setting the log level
You can set the appropriate log level in the OpenTelemetryCollector custom resource:
Log level descriptions
The Collector supports the following log levels:
debug: Detailed debugging information, suitable for in-depth troubleshootinginfo: General informational logs, default levelwarn: Warning messageserror: Error messages
TIP
In production environments, it is recommended to use the info level. Only use the debug level when detailed diagnostic information is needed, as it generates substantial log output.
Viewing the Collector logs
After configuring the log level, you can view the Collector logs using the following command:
If the Collector runs in Deployment mode, you can view logs from all replicas: