Configuration Options
The OpenTelemetry Collector architecture consists of five primary component types that work together to handle telemetry data throughout its lifecycle:
- Receivers: Components that ingest telemetry data into the Collector
- Processors: Components that transform, filter, or enrich data as it flows through the pipeline
- Exporters: Components that send processed data to backend systems or destinations
- Connectors: Components that link pipeline segments by acting as both exporters and receivers
- Extensions: Optional components that provide auxiliary functionality without directly processing telemetry data
TOC
Component ConfigurationConfiguration ExampleComponent type namesConfiguration ParametersPipeline ConfigurationCollector Resource OptionsIngress and Gateway APICollector StatusComponent Configuration
You can define multiple instances of each component type within a custom resource YAML file. However, components must be explicitly enabled through pipeline definitions in the spec.config.service section to become active.
As a best practice, only enable the components you actually need. This reduces resource consumption and simplifies troubleshooting.
Configuration Example
The following example demonstrates a basic OpenTelemetry Collector configuration with OTLP receivers and multiple exporters:
- The OTLP exporter is named
otlp_grpc, while the OTLP receiver above keeps the nameotlp. See Component type names. - Components defined in the configuration but not referenced in the
service.pipelinessection remain inactive. A component must be added to at least one pipeline to function.
Component type names
Upstream renamed most component type identifiers to snake_case, and renamed the two OTLP exporters so that the transport is explicit in the name:
The deprecated names still work, so existing configurations keep running, but the Collector logs a warning for each affected component instance and upstream intends to remove the aliases in a future release:
For the full list of renamed components, see the v2.1.0 Release Notes.
Configuration Parameters
The following table describes the main configuration parameters used by the Operator to define the OpenTelemetry Collector:
The Values column lists representative components only. For the full set of supported components and their current type names, see Receivers, Processors, Exporters, Connectors, and Extensions.
Pipeline Configuration
Pipelines are defined under service.pipelines and specify the flow of telemetry data through the Collector. Each pipeline type (traces, metrics, logs) can have its own set of receivers, processors, and exporters.
Example pipeline configuration:
Each pipeline independently processes its telemetry type, allowing you to configure different processing logic for traces, metrics, and logs based on your observability requirements.
Collector Resource Options
The fields above live under spec.config and configure the Collector process itself. The OpenTelemetryCollector custom resource also exposes fields that control how the Operator deploys the Collector workload.
Example:
- Only meaningful in
statefulsetmode. Leave it unset fordeployment,daemonset, andsidecarmode. - Each entry maps one IP address to one or more hostnames inside the Collector pod.
- Pins each client IP to one Collector replica.
sessionAffinityConfigis optional; omit it to keep the default 3-hour timeout.
Ingress and Gateway API
The Operator can expose the Collector's receiver ports through either an Ingress resource or a Gateway API HTTPRoute resource. Both are available in deployment, daemonset, and statefulset mode only.
spec.ingresscreates anIngressresource. Configure the hostname, annotations, and TLS settings under this field.spec.httpRoutecreates a Gateway APIHTTPRouteresource. Choose this when your cluster routes north-south traffic through a Gateway API implementation rather than an Ingress controller.
The following example attaches the Collector to an existing Gateway:
- Required. Enables the
HTTPRouteconfiguration. - Required. The name of the
Gatewayresource to attach the route to. - The namespace of the
Gatewayresource. Defaults to the Collector's own namespace. - Hostnames matched by the route. When empty, the route matches any hostname.
Collector Status
The OpenTelemetryCollector resource reports reconciliation state through status.observedGeneration and status.conditions. Automation that waits for a Collector to converge should compare status.observedGeneration against metadata.generation before reading conditions, so that it does not act on a status produced for an earlier revision of the resource.