Before continuing, you can familiarize yourself with the OpenTelemetry project, which is a set of APIs, SDKs, and tools that can be used to instrument applications for observability.
Gardener currently leverages the OpenTelemetryCollector binary in the control-plane of Shoot clusters and as a log shipper
on the Shoot nodes themselves. More use cases are planned in the future.
Since the OpenTelemetry Collector uses a modular architecture, it can be built for specific use cases by selecting only the necessary components. This repository takes care of defining listing these components for the Gardener use cases and managing the build and upload steps of the resulting distribution.
This opentelemetry distribution combines components from Opentelemetry Collector Core and Opentelemetry Collector Contrib. The complete list of components can be found in manifest.yml
The manifest.yaml describes all the necessary components that the OpenTelemetry Collector distribution should include.
They are grouped into receivers, processors, exporters, extensions and connector. Each is defined with its name and version.
For more details, consult the OpenTelemetry Collector documentation.
The repository depends on the opentelemetry-collector-builder tool to build the aforementioned distribution. This can easily be done by using the predefined make targets:
make buildThis will:
- Download necessary tools in a
_tools/directory (Including the opentelemetry-collector-builder tool) - Call the build tool with the
manifest.yamlfile to build the distribution in a_build/directory - Download all dependencies of the generated code in
_buildby callinghack/build_distribution.sh
Since this repository contains no code of its own, but only a manifest file, an SAST report
can be created only on the generated code in the _build directory.
This can be done by running the following command:
make go-sec-report-buildThis will generate a SAST report after going through the build process and will output the report in the _build/gosec-report.sarif file.
Images of the OpenTelemetry Collector distribution can be built by calling the docker-image target:
make docker-image