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.
TOC
Setting the log levelViewing the Collector logsCommon startup warningsDeprecated component type aliasSetting 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
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:
Common startup warnings
Deprecated component type alias
The component is configured under a type name that upstream has renamed. The old name still resolves to the same implementation, so the Collector runs normally and no data is lost, but the alias will be removed in a future release.
Read otelcol.component.kind before editing the configuration — it tells you which section to change. In the example above the warning is about an exporter, so only the exporters section needs the new name; the OTLP receiver in the same configuration keeps the name otlp. Rename the component under spec.config, keeping any /name suffix:
The warning is logged once per component instance at startup, so it reappears on every restart until the configuration is updated. For the full list of renamed components, see Component type names.