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:

config:
  service:
    telemetry:
      logs:
        level: debug

Log level descriptions

The Collector supports the following log levels:

  • debug: Detailed debugging information, suitable for in-depth troubleshooting
  • info: General informational logs, default level
  • warn: Warning messages
  • error: 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:

kubectl logs <collector-pod-name> -n <namespace>

If the Collector runs in Deployment mode, you can view logs from all replicas:

kubectl logs -l app.kubernetes.io/name=otel-collector -n opentelemetry-collector

Common startup warnings

Deprecated component type alias

warn  builders/builders.go:40  "otlp" alias is deprecated; use "otlp_grpc" instead
  {"otelcol.component.id": "otlp/traces", "otelcol.component.kind": "exporter", "otelcol.signal": "traces"}

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:

exporters:
  otlp_grpc/traces: # was otlp/traces
    endpoint: jaeger-collector:4317

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.