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 the latest release notes of the collector in a header with {PDATA_VERSION}/{COLLECTOR_VERSION}. All three version arguments should include the v - an example run of the script would look like this:
./scripts/update-otel.sh v0.114.0 v0.114.0 v1.20.0
-
Run
make tidy
-
Run:
./scripts/update-docs.sh {COLLECTOR_VERSION} {CONTRIB_VERSION}
These should be the same versions used in the first step.
-
Run
make install-tools
-
Run
make generate
-
Run
make tidy
-
Run
make ci-checks
If all was successful, the repo has had its 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.