The OpenTelemetry Collector is a middleware that can run either very close to your workloads (“agent” mode), or on a central location (“collector”, or “service” mode). It is built following a pipeline principle, with
exporters, potentially making use of
receiversare the components that are responsible for gathering or receiving telemetry data
processorsare able to look into the telemetry data and take decisions based on them, such as perform data cleanup, apply sampling decisions, include or remove attributes, enrich data based on where it’s running, among others
exporterswill then send the data out of the process, likely to one or more telemetry backends or another layer of collectors
extensionsare not part of the data pipeline but can help other components like the authentication extensions, or the collector as a whole, like the debugging interfaces
The OpenTelemetry Collector is very versatile and can be used in different use cases. By being very lightweight, it can be placed with minimal overhead close to your workloads in “agent” mode (sidecar or daemon set). Given that collectors can be chained together, it is also common to have a layer of central collectors doing different sorts of data processing and validation. When chaining OpenTelemetry Collectors together, we recommend setting up TLS between them. We also recommend using the OTLP receivers and exporters on the communication, avoiding data translation costs, given that the internal data model used by the OpenTelemetry Collector is backed by OTLP.
We assembled the following examples to serve as inspiration to you.