Skip to content

Commit

Permalink
go agent protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
iamemilio committed Aug 21, 2024
1 parent b838457 commit 383894e
Show file tree
Hide file tree
Showing 9 changed files with 570 additions and 425 deletions.
12 changes: 9 additions & 3 deletions v3/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
module github.com/newrelic/go-agent/v3

go 1.20
go 1.21

require (
google.golang.org/protobuf v1.5.3
google.golang.org/grpc v1.56.3
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
)

retract v3.22.0 // release process error corrected in v3.22.1

Expand Down
5 changes: 4 additions & 1 deletion v3/integrations/nramqp/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module github.com/newrelic/go-agent/v3/integrations/nramqp

go 1.20
go 1.21

toolchain go1.22.6

require (
github.com/newrelic/go-agent/v3 v3.33.1
github.com/rabbitmq/amqp091-go v1.9.0
)

replace github.com/newrelic/go-agent/v3 => ../..
7 changes: 4 additions & 3 deletions v3/integrations/nrawsbedrock/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
module github.com/newrelic/go-agent/v3/integrations/nrawsbedrock

go 1.20
go 1.21

toolchain go1.22.6

require (
github.com/aws/aws-sdk-go-v2 v1.26.0
github.com/aws/aws-sdk-go-v2/config v1.27.4
github.com/aws/aws-sdk-go-v2/service/bedrock v1.7.3
github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.7.1
github.com/google/uuid v1.3.0
github.com/google/uuid v1.6.0
github.com/newrelic/go-agent/v3 v3.33.1
)


replace github.com/newrelic/go-agent/v3 => ../..
3 changes: 1 addition & 2 deletions v3/integrations/nrawssdk-v1/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ module github.com/newrelic/go-agent/v3/integrations/nrawssdk-v1
// As of Dec 2019, aws-sdk-go's go.mod does not specify a Go version. 1.6 is
// the earliest version of Go tested by aws-sdk-go's CI:
// https://github.com/aws/aws-sdk-go/blob/master/.travis.yml
go 1.20
go 1.21

require (
// v1.15.0 is the first aws-sdk-go version with module support.
github.com/aws/aws-sdk-go v1.34.0
github.com/newrelic/go-agent/v3 v3.33.1
)


replace github.com/newrelic/go-agent/v3 => ../..
5 changes: 3 additions & 2 deletions v3/integrations/nrawssdk-v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module github.com/newrelic/go-agent/v3/integrations/nrawssdk-v2

// As of May 2021, the aws-sdk-go-v2 go.mod file uses 1.15:
// https://github.com/aws/aws-sdk-go-v2/blob/master/go.mod
go 1.20
go 1.21

toolchain go1.22.6

require (
github.com/aws/aws-sdk-go-v2 v1.16.15
Expand All @@ -14,5 +16,4 @@ require (
github.com/newrelic/go-agent/v3 v3.33.1
)


replace github.com/newrelic/go-agent/v3 => ../..
12 changes: 6 additions & 6 deletions v3/integrations/nrgrpc/go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/newrelic/go-agent/v3/integrations/nrgrpc

go 1.20
go 1.21

toolchain go1.22.6

require (
// protobuf v1.3.0 is the earliest version using modules, we use v1.3.1
// because all dependencies were removed in this version.
github.com/golang/protobuf v1.5.3
github.com/newrelic/go-agent/v3 v3.33.1
github.com/newrelic/go-agent/v3/integrations/nrsecurityagent v1.1.0
// v1.15.0 is the earliest version of grpc using modules.
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.33.0
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require github.com/golang/protobuf v1.5.4

replace github.com/newrelic/go-agent/v3/integrations/nrsecurityagent => ../../integrations/nrsecurityagent

Expand Down
18 changes: 5 additions & 13 deletions v3/internal/com_newrelic_trace_v1/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
# com_newrelic_trace_v1

To generate the `v1.pb.go` code, run the following from the top level
`github.com/newrelic/go-agent` package:
`github.com/newrelic/go-agent/v3` package:

```
protoc --go_out=paths=source_relative,plugins=grpc:. v3/internal/com_newrelic_trace_v1/v1.proto
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative v3/internal/com_newrelic_trace_v1/v1.proto
```

Be mindful which version of `protoc-gen-go` you are using. Upgrade
`protoc-gen-go` to the latest with:

```
go get -u github.com/golang/protobuf/protoc-gen-go
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
```

## When you regenerate the file

Once you have generated the code, you will need to add a build tag to the file:

```go
// +build go1.9
```

This is because the gRPC/Protocol Buffer libraries only support Go 1.9 and
above.
https://grpc.io/docs/languages/go/quickstart/
Loading

0 comments on commit 383894e

Please sign in to comment.