← All insightsAutomation

Automating OpenTelemetry from scratch

CodeWizard Academy · 18 April 2026 · 3 min read · Intermediate

Anything you do to OpenTelemetry twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
docker run -p 4317:4317 -p 4318:4318 \
  -v $PWD/otel.yaml:/etc/otelcol/config.yaml otel/opentelemetry-collector

2. Describe the desired state

A Collector pipeline: receive OTLP, batch, export.

yaml
receivers:
  otlp: { protocols: { grpc: {}, http: {} } }
processors:
  batch: {}
exporters:
  prometheus: { endpoint: 0.0.0.0:8889 }
  otlphttp: { endpoint: https://tempo:4318 }
service:
  pipelines:
    traces:  { receivers: [otlp], processors: [batch], exporters: [otlphttp] }
    metrics: { receivers: [otlp], processors: [batch], exporters: [prometheus] }

3. Run it from CI

Validate Collector config in CI.

yaml
- run: otelcol validate --config otel.yaml

Want senior help putting OpenTelemetry to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult