I am new to OpenTelemetry and I am trying to build a custom collector following the instructions here: https://opentelemetry.io/docs/collector/custom-collector/
I am running Windows 10 Enterprise 64-bit. I downloaded otel_0.83.0_windows_386.tar.gz from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.83.0/otelcol_0.83.0_windows_386.tar.gz
(I also tried otelcol-contrib_0.83.0_windows_386.tar.gz but it had the same issue).
I used 7-zip to unpack all the files in the tar (LICENSE, otelcol.exe and README.md) into a directory and then created build-config.yaml copied from the custom-collector page:
dist:
name: otelcol-dev
description: Basic OTel Collector distribution for Developers
output_path: ./otelcol-dev
otelcol_version: 0.83.0
exporters:
- gomod:
go.opentelemetry.io/collector/exporter/loggingexporter v0.83.0
- gomod:
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter
v0.83.0
processors:
- gomod:
go.opentelemetry.io/collector/processor/batchprocessor v0.83.0
receivers:
- gomod:
go.opentelemetry.io/collector/receiver/otlpreceiver v0.83.0
When I run .otelcol.exe --config .uilder-config.yaml from Windows PowerShell (non-admin) I get the following:
Error: failed to get config: cannot unmarshal the configuration: 4 error(s) decoding:
* has invalid keys: dist
* exporters expected a map, got slice
* processors expected a map, got slice
* receivers expected a map, got slice
2023/08/16 12:23:42 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 4 error(s) decoding:
* has invalid keys: dist
* exporters expected a map, got slice
* processors expected a map, got slice
* receivers expected a map, got slice
Does anyone have any ideas or suggestions on what I m doing wrong? My ultimate aim is to create a Docker image + Kubernetes with a collector than can send metrics to Azure Insights so if I m going down the wrong track with a custom collector that would be good to know.
Thanks in advance.