Clone this repository, and run make install-tools
To create a build for your current machine, run make agent
To build for a specific architecture, see the Makefile
To build all targets, run make build-all
Build files will show up in the ./dist
directory
Tests can be run with make test
.
The CI runs the ci-checks
make target, which includes linting, testing, and checking documentation for misspelling.
CI also does a build of all targets (make build-all
)
Most of the process for updating the OTEL dependency is automated with scripts. If at any point there is a failure, try running make tidy
to see if updating the go.mod
is able to resolve the issue.
The steps are as follows:
-
Run:
./scripts/update-otel.sh {COLLECTOR_VERSION} {CONTRIB_VERSION} {PDATA_VERSION}
Grab the different versions from OTEL's GitHub by checking the latest release versions of collector-contrib and the collector. They should be the same. The pdata version can be found by checking which version of it is imported in the collector-contrib go.mod file. The specific line with the pdata version should look similar to
go.opentelemetry.io/collector/pdata v1.0.0 // indirect
-
Run
make tidy
-
Run:
./scripts/update-docs.sh {COLLECTOR_VERSION} {CONTRIB_VERSION}
These should be the same versions used in the first step.
-
Update the
mdatagen
package in theinstall-tools
command in the Makefile to now point to the same version as collector-contrib.Specifically, this line is the one to update:
.PHONY: install-tools install-tools: ... go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/mdatagen@v0.90.1
-
Run
make install-tools
-
Run
make generate
-
Run
make tidy
-
Run
make ci-checks
If all was successful, the repo has had it's OTEL dependencies updated to the latest version.
There is potential for tests to fail, deprecation issues, code changes, or a variety of other problems to arise, but once the above steps are successful the repo can be updated.
To release the agent, see releasing documentation.