The OpenTelemetry collector can serve as an agent that grabs log files. It turns them into LogRecords, and then you can emit them as OTLP (or other formats).

Parsing log files is not trivial, so you get to configure the filelog receiver. So messy. So hard to test.
Thanks to the commonly-used, fairly-standardized deployment environment of Kubernetes, some contributors have made this easier. They added a new component for the FileLog receiver that understands how the container runtimes do logs.
The components for the filelog receiver are called “operators,” which is confusing because this has nothing to do with the Kubernetes Operator for OpenTelemetry. Instead: because log reading and parsing is super complicated, this one receiver has all these flexible modules that make it do stuff. The new container log parser is a particularly complicated one.
Here’s the post about the new container log parser: https://opentelemetry.io/blog/2024/otel-collector-container-log-parser/
And new this month: it’s now used in the OpenTelemetry Collector helm chart. So encapsulated. So clean.






