Skip to content
All flows
traces
metrics
logs

Dual Backend Migration

Fans every trace, metric, and log out to both the legacy agent and the new OTLP/HTTP backend so the two can be compared side by side during a migration.

Every trace, metric, and log fans out to two backends at once: the legacy agent keeps receiving exactly what it always has, and the new OTLP/HTTP backend receives the same stream, so dashboards and alerts can be compared side by side before anything is cut over. A resource processor stamps `deployment.environment: production` on the way through. Point `otlp/legacy` at your existing agent and set `NEW_BACKEND_OTLP_ENDPOINT` for the new destination. When the comparison holds, delete the `otlp/legacy` exporter from the pipelines and the migration is done — the fan-out is the whole flow.

Before you use this

Sends data to

otlp
otlphttp

You'll need to set these before it runs

NEW_BACKEND_OTLP_ENDPOINT

The configuration

collector v0.147.0
# OpenTelemetry Collector Configuration
# Generated by Telflo

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: '0.0.0.0:4317'
      http:
        endpoint: '0.0.0.0:4318'
processors:
  memory_limiter:
    check_interval: '1s'
    limit_percentage: 80
  resource:
    attributes:
      - key: 'deployment.environment'
        value: 'production'
        action: 'upsert'
  batch:
    timeout: '10s'
exporters:
  otlp/legacy:
    endpoint: 'legacy-agent.internal:4317'
    tls:
      insecure: true
  otlphttp/new:
    endpoint: '${env:NEW_BACKEND_OTLP_ENDPOINT}' # e.g. https://otlp-gateway-<stack>.grafana.net/otlp
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, resource, batch]
      exporters: [otlp/legacy, otlphttp/new]
    metrics:
      receivers: [otlp]
      processors: [memory_limiter, resource, batch]
      exporters: [otlp/legacy, otlphttp/new]
    logs:
      receivers: [otlp]
      processors: [memory_limiter, resource, batch]
      exporters: [otlp/legacy, otlphttp/new]

Validated against otelcol-contrib v0.147.0. Fill in the ${env:…} placeholders before running it.

migration
dual-ship
backend