-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated nrgin integration to more accurately report code locations …
…when code level metrics are enabled. * The Go Agent and all integrations now require Go version 1.17 or later. * Updated minimum versions for third-party modules. * nrawssdk-v2, nrecho-v4, nrgrpc, nrmongo, nrmysql, nrnats, and nrstan now require Go Agent 3.18.2 or later * the Go Agent now requires protobuf 1.5.2 and grpc 1.49.0 * Internal dev process and unit test improvements. New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life. We also recommend using the latest version of the Go language. At minimum, you should at least be using no version of Go older than what is supported by the Go team themselves. See the [Go Agent EOL Policy](https://docs.newrelic.com/docs/apm/agents/go-agent/get-started/go-agent-eol-policy/) for details about supported versions of the Go Agent and third-party components.
- Loading branch information
Showing
19 changed files
with
218 additions
and
83 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
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,62 @@ | ||
# Copyright 2020 New Relic Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -x | ||
set -e | ||
|
||
# inputs | ||
# 1: repo pin; example: github.com/rewrelic/go-agent@v1.9.0 | ||
pin_go_dependency() { | ||
if [[ ! -z "$1" ]]; then | ||
echo "Pinning: $1" | ||
repo=$(echo "$1" | cut -d '@' -f1) | ||
pinTo=$(echo "$1" | cut -d '@' -f2) | ||
set +e | ||
go get -u "$repo" # this go get will fail to build | ||
set -e | ||
cd "$GOPATH"/src/"$repo" | ||
git checkout "$pinTo" | ||
cd - | ||
fi | ||
} | ||
|
||
verify_go_fmt() { | ||
needsFMT=$(gofmt -d .) | ||
if [ ! -z "$needsFMT" ]; then | ||
echo "$needsFMT" | ||
echo "Please format your code with \"gofmt .\"" | ||
# exit 1 | ||
fi | ||
} | ||
|
||
pwd=$(pwd) | ||
version=$(go version) | ||
echo $version | ||
|
||
tmp=$(echo $version | cut -d 'o' -f4) | ||
shortVersion=${tmp%.*} | ||
|
||
IFS="," | ||
for dir in $DIRS; do | ||
cd "$pwd/$dir" | ||
|
||
# replace go-agent with local pull | ||
go mod edit -replace github.com/newrelic/go-agent/v3="$pwd"/v3 | ||
|
||
# manage dependencies | ||
go mod tidy -go=$shortVersion -compat=$shortVersion | ||
pin_go_dependency "$PIN" | ||
|
||
# run tests | ||
go test -race -benchtime=1ms -bench=. ./... | ||
go vet ./... | ||
verify_go_fmt | ||
|
||
# Test again against the latest version of the dependencies to ensure that | ||
# our instrumentation is up to date. TODO: Perhaps it is possible to | ||
# upgrade all go.mod dependencies to latest master with a go command. | ||
if [ -n "$EXTRATESTING" ]; then | ||
eval "$EXTRATESTING" | ||
go test -race -benchtime=1ms -bench=. ./... | ||
fi | ||
done |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module github.com/newrelic/go-agent/v3 | ||
|
||
go 1.7 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/golang/protobuf v1.4.3 | ||
google.golang.org/grpc v1.39.0 | ||
github.com/golang/protobuf v1.5.2 | ||
google.golang.org/grpc v1.49.0 | ||
) |
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
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
Oops, something went wrong.