-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: include Go version, GOOS, & GOARCH in user-agent (#207)
## Which problem is this PR solving? It helps Honeycomb support customers to know what operating systems and CPU architectures instrumentation is running upon. OpenTelemetry has added this to the Collector and the spec for Exporters and we have [prior art for this in libhoney-rb](honeycombio/libhoney-rb#105). ## Short description of the changes - Updated the user-agent to include Go version, GOOS, and GOARCH - Makefile addition with a test target to bring the CI test execution mechanism up-to-date with what we're doing in other Go codebases to make it easy to run the tests, make it each to read the test output, and give CI the data it needs to helps us see test failures more clearly. - Moved our libhoney version declaration out of the parent libhoney package and into version so that other packages (transmission) can reference it. That allows the usual user-agent to be pre-computed. - User-agent assertions updated to use testify because the failure output for diffs is so much friendlier.
- Loading branch information
Showing
8 changed files
with
49 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: test | ||
#: run the tests! | ||
test: | ||
ifeq (, $(shell which gotestsum)) | ||
@echo " ***" | ||
@echo "Running with standard go test because gotestsum was not found on PATH. Consider installing gotestsum for friendlier test output!" | ||
@echo " ***" | ||
go test -race -v ./... | ||
else | ||
gotestsum --junitfile unit-tests.xml --format testname -- -race ./... | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package version | ||
|
||
const ( | ||
Version string = "1.17.1" | ||
) |