x-pack/otel/distributions/beats-otel-collector/README.md
This distribution is used to ensure compatibility between Beats components and the OpenTelemetry collector builder. It is not intended for public release.
All Beats components should be added to this distribution's manifest to ensure integration with OpenTelemetry Collector binaries.
To add a new Beats component located at ./x-pack/otel/extension/customextension, append the following entries to the manifest.yaml file:
receivers:
- gomod: github.com/elastic/beats/v7/x-pack/otel/extension/customextension v0.0.0
# Add to replaces section:
replaces:
- github.com/elastic/beats/v7/x-pack/otel/extension/customextension => ../extension/customextension
Then add the component to the example configuration file.
From the x-pack/otel directory, use the mage target:
mage buildOtelDistro
This requires ocb to be installed and available on PATH.
Run the collector with the example config.yaml:
mage runOtelDistro
To use a custom config file, pass it via OTEL_ARGS:
OTEL_ARGS="--config /path/to/config.yaml" mage runOtelDistro