Skip to content

Gotcha: OTel collector spanmetrics is a connector, not a processor

Symptom

error decoding 'processors': unknown type: "spanmetrics"

Root cause

In older OTel collector versions, spanmetrics was a processor. In recent versions (0.100+), it was moved to a connector — a new component type that bridges between signal pipelines (traces → metrics).

Fix

Use the connectors section, not processors:

connectors:
  spanmetrics:
    namespace: gemma_forge
    dimensions:
      - name: gen_ai.request.model

service:
  pipelines:
    traces:
      exporters: [otlp/jaeger, spanmetrics]  # spanmetrics as exporter
    metrics:
      receivers: [spanmetrics]  # spanmetrics as receiver

The connector appears as an exporter in the traces pipeline and a receiver in the metrics pipeline.

Environment

  • otel/opentelemetry-collector-contrib:0.121.0