This project is an example of a custom OpenTelemetry processor. It demonstrates how to create a custom OpenTelemetry processor in Go and how to integrate it with the OpenTelemetry ecosystem. This processor is intended solely for demonstration purposes.
In src directory, you can find 3 go files:
config.goused to specify the processor's configuration parametersfactory.gocontaining the instantiation of the processorprocessor.gowhich is the "real" processor code (especially theprocessTracesmethod)
Before you begin, ensure you have the following installed on your machine:
- Make (for build and run tasks)
- Go
- OTEL Builder
Clone this repository:
git clone https://github.com/your-username/custom-otel-processor.git
cd custom-otel-processorTo build the collector, use the build task in the Makefile:
make buildTo run the collector, use the run task in the Makefile:
make runThe result is an otel-cujprocessor binary available in the dist directory.