service section acts as the Collector’s control plane — it activates pipelines, selects which component instances are used, and defines processor execution order and internal telemetry settings.

- Receivers ingest telemetry into the Collector.
- Processors transform, filter, or enrich telemetry; order is significant (executed left-to-right).
- Exporters send telemetry to backends (or local logging/debugging exporters).
- The
serviceblock references component instances and binds them to each pipeline.
| Component type | Purpose | Example usage |
|---|---|---|
| Receiver | Ingest telemetry from sources | otlp (gRPC/HTTP), prometheus |
| Processor | Transform/filter/limit telemetry; order matters | attributes, batch, memory_limiter |
| Exporter | Deliver telemetry to backends or local debug | otlphttp, prometheusremotewrite, debug |
| Extension | Runtime features not part of pipelines | health_check, pprof, file_storage |
- You can create multiple instances of a component type using
type/name(example:otlp/ingest2). - Any instance referenced by a pipeline must exist under the corresponding top-level
receivers,processors, orexporterssection. - If a component is not listed in the
servicepipelines, it will not be active.
- The
serviceblock also configures the Collector’s internal logs and metrics. - Older configs used a single
metrics.addressfield. Current Collector releases prefertelemetry.metrics.readersfor flexible pull (Prometheus) and push (periodic) strategies.
Processor order matters. Put limiters or normalizers (for example
memory_limiter, attributes) before the batch processor so transformations and limits are applied prior to batching.pull: exposes a Prometheus scrape endpoint.periodic: periodically pushes Collector-internal metrics to an OTLP endpoint.- Both readers can run concurrently to support mixed workflows.



traces/prod and traces/dev) with different receivers/processors/exporters:

If both blue and green pipelines are active and receive the same input, you will produce duplicate telemetry at the destination(s). Use routing rules or switch receivers to avoid duplication during cutover.

| Problem | Quick fix |
|---|---|
| Component not active | Ensure the instance name is referenced in service.pipelines. |
| Processor order incorrect | Run normalizers/limiters before batch (e.g., memory_limiter before batch). |
| Deprecated metrics address in config | Replace with telemetry.metrics.readers. |
| Debug/logging exporters in prod | Remove or replace with production exporters; keep debug for troubleshooting only. |
| Port conflicts | Assign unique host/port values for Prometheus receivers or internal metrics endpoints. |
| Configuration errors | Validate config with otelcol --config config.yaml --validate (or your distribution’s validation command). |

service.extensions:
- If an exporter uses retries and a sending queue, bind the queue storage to a
file_storageextension so telemetry is persisted locally while the backend is unavailable:
- When
health_checkis enabled and added toservice.extensions, the Collector exposes a health endpoint (useful for Kubernetes liveness/readiness probes) on the configured port (example: 13133).

- The
servicesection is mandatory: unreferenced components are ignored. - Processor execution order is left-to-right — put limiters/normalizers before
batch. - Fan-out: a pipeline can export the same data to multiple destinations.
- Fan-in: multiple receivers can feed a single normalized pipeline.
- Use
debugorloggingexporters only for troubleshooting; avoid in production. - Use
telemetry.metrics.readersto expose internal metrics (Prometheus pull or periodic pushes). - Validate configuration before starting the Collector and use internal metrics/debug exporter to analyze behavior:
otelcol --config config.yaml --validate
- OpenTelemetry Collector documentation: https://opentelemetry.io/docs/collector/
- Prometheus: https://prometheus.io/
- Kubernetes probes and readiness/liveness: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/