OpenTelemetry Collector¶
The OpenTelemetry Collector is a service that acts as a processing pipeline for telemetry data, such as logs and traces.^[open-telemetry__README.md] It operates by receiving data, processing it through various components, and exporting it to different backends.
Core Architecture¶
The Collector is configured via a pipeline architecture defined under the service section, consisting of three main component types^[open-telemetry__README.md]:
- Receivers: Responsible for ingesting data. The configuration supports multiple protocols, such as
grpcandhttp, often listening on specific ports like4317for gRPC^[open-telemetry__README.md]. - Processors: Modify or batch data before it is exported. A common example is the
batchprocessor^[open-telemetry__README.md]. - Exporters: Send the processed data to a destination. In sample configurations, this might be a
loggingexporter that outputs tostdoutfor debugging^[open-telemetry__README.md].
Configuration¶
The behavior of the Collector is defined by a configuration file (typically otel.yaml). This file defines the specific receivers, processors, and exporters to be used, binding them together within named pipelines (e.g., a logs pipeline)^[open-telemetry__README.md].
Example Configuration¶
A basic configuration for an OpenTelemetry Agent might look like this:
receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
logging:
loglevel: debug
service:
pipelines:
logs:
receivers: [otlp]
processors: [batch]
exporters: [logging]
This example sets up a receiver for OTLP (OpenTelemetry Protocol), uses a batch processor, and outputs the results to standard logging^[open-telemetry__README.md].
Related Concepts¶
- [[OpenTelemetry]]
- Istio
- [[Observability]]
Sources¶
- open-telemetry__README.md