Skip to content

Commit

Permalink
fixed nil transaction handling in StartSegment transaction method, pr…
Browse files Browse the repository at this point in the history
…eparation for 3.37 release
  • Loading branch information
nr-swilloughby committed Feb 25, 2025
1 parent 9e8e9fb commit f6ca661
Show file tree
Hide file tree
Showing 60 changed files with 142 additions and 124 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## 3.37.0
### Enhanced
- Implemented a new approach to integrating New Relic with SLOG that is more lightweight, out of the way, and collects richer data. These changes have been constructed to be completely backwards-compatible with v1 of nrslog. Changes include:
- Wrapping `slog.Handler` objects with errors to allow users to handle invalid use cases
- A complete rework of log enrichment so that New Relic linking metadata does not invalidate JSON, BSON, or YAML scanners. This new approach will instead inject the linking metadata as a key-value pair.
- Complete support for `With()`, `WithGroup()`, and attributes for automatic instrumentation.
- Performance operations.
- Robust testing (close to 90% coverage).
- **This updates logcontext-v2/nrslog to v1.4.0.**
- Now custom application tags (labels) may be added to all forwarded log events.
- Enabled if `ConfigAppLogForwardingLabelsEnabled(true)` or `NEW_RELIC_APPLICATION_LOGGING_FORWARDING_LABELS_ENABLED=TRUE`
- May exclude labels named in `ConfigAppLogForwardingLabelsExclude("label1","label2",...)` or `NEW_RELIC_APPLICATION_LOGGING_FORWARDING_LABELS_EXCLUDE="label1,label2,..."`
- Labels are defined via `ConfigLabels(...)` or `NEW_RELIC_LABELS`
- Added memory allocation limit detection/response mechanism to facilitate calling custom functions to perform application-specific resource management functionality, report custom metrics or events, or take other appropriate actions, in response to rising heap memory size.

### Support statement
We use the latest version of the Go language. At minimum, you should be using no version of Go older than what is supported by the Go team themselves.
See the [Go agent EOL Policy](/docs/apm/agents/go-agent/get-started/go-agent-eol-policy) for details about supported versions of the Go agent and third-party components.

### Fixed
- Added protection around transaction methods to gracefully return when the transaction object is `nil`.

## 3.36.0
### Enhanced
- Internal improvements to securityagent integration to better support trace handling and other support for security analysis of applications under test, now v1.3.4; affects the following other integrations:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Go is a compiled language, and doesn’t use a virtual machine. This means that

### Compatibility and Requirements

For the latest version of the agent, Go 1.18+ is required.
For the latest version of the agent, Go 1.22+ is required.

Linux, OS X, and Windows (Vista, Server 2008 and later) are supported.

Expand Down
3 changes: 2 additions & 1 deletion v3/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module github.com/newrelic/go-agent/v3

go 1.21
go 1.22

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


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

retract v3.25.0 // release process error corrected in v3.25.1
Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/logWriter/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/logWriter

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrwriter v1.0.0
)

Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/nrlogrus/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrlogrus

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/sirupsen/logrus v1.8.1
)

Expand Down
5 changes: 3 additions & 2 deletions v3/integrations/logcontext-v2/nrslog/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrslog

go 1.21
go 1.22

require github.com/newrelic/go-agent/v3 v3.37.0

require github.com/newrelic/go-agent/v3 v3.36.0

replace github.com/newrelic/go-agent/v3 => ../../..
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/nrwriter/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrwriter

go 1.21
go 1.22

require github.com/newrelic/go-agent/v3 v3.36.0
require github.com/newrelic/go-agent/v3 v3.37.0


replace github.com/newrelic/go-agent/v3 => ../../..
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/nrzap/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrzap

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
go.uber.org/zap v1.24.0
)

Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/nrzerolog/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrzerolog

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/rs/zerolog v1.26.1
)

Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/logcontext-v2/zerologWriter/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/zerologWriter

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrwriter v1.0.0
github.com/rs/zerolog v1.27.0
)
Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/logcontext/nrlogrusplugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext/nrlogrusplugin

// As of Dec 2019, the logrus go.mod file uses 1.13:
// https://github.com/sirupsen/logrus/blob/master/go.mod
go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
// v1.4.0 is required for for the log.WithContext.
github.com/sirupsen/logrus v1.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nramqp/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/nramqp

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/rabbitmq/amqp091-go v1.9.0
)
replace github.com/newrelic/go-agent/v3 => ../..
4 changes: 2 additions & 2 deletions v3/integrations/nrawsbedrock/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/newrelic/go-agent/v3/integrations/nrawsbedrock

go 1.21
go 1.22

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.6.0
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrawssdk-v1/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +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.21
go 1.22

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.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
6 changes: 2 additions & 4 deletions v3/integrations/nrawssdk-v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ 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.21

toolchain go1.21.0
go 1.22

require (
github.com/aws/aws-sdk-go-v2 v1.30.4
Expand All @@ -14,7 +12,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/s3 v1.61.0
github.com/aws/aws-sdk-go-v2/service/sqs v1.34.6
github.com/aws/smithy-go v1.20.4
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrb3/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/newrelic/go-agent/v3/integrations/nrb3

go 1.21
go 1.22

require github.com/newrelic/go-agent/v3 v3.36.0
require github.com/newrelic/go-agent/v3 v3.37.0


replace github.com/newrelic/go-agent/v3 => ../..
4 changes: 2 additions & 2 deletions v3/integrations/nrecho-v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module github.com/newrelic/go-agent/v3/integrations/nrecho-v3

// 1.7 is the earliest version of Go tested by v3.1.0:
// https://github.com/labstack/echo/blob/v3.1.0/.travis.yml
go 1.21
go 1.22

require (
// v3.1.0 is the earliest v3 version of Echo that works with modules due
// to the github.com/rsc/letsencrypt import of v3.0.0.
github.com/labstack/echo v3.1.0+incompatible
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrecho-v4/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/newrelic/go-agent/v3/integrations/nrecho-v4

// As of Jun 2022, the echo go.mod file uses 1.17:
// https://github.com/labstack/echo/blob/master/go.mod
go 1.21
go 1.22

require (
github.com/labstack/echo/v4 v4.9.0
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrelasticsearch-v7/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/newrelic/go-agent/v3/integrations/nrelasticsearch-v7

// As of Jan 2020, the v7 elasticsearch go.mod uses 1.11:
// https://github.com/elastic/go-elasticsearch/blob/7.x/go.mod
go 1.21
go 1.22

require (
github.com/elastic/go-elasticsearch/v7 v7.17.0
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrfasthttp/examples/client-fasthttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module client-example

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/newrelic/go-agent/v3/integrations/nrfasthttp v1.0.0
github.com/valyala/fasthttp v1.49.0
)
Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrfasthttp/examples/server-fasthttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module server-example

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/newrelic/go-agent/v3/integrations/nrfasthttp v1.0.0
github.com/valyala/fasthttp v1.49.0
)
Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrfasthttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/newrelic/go-agent/v3/integrations/nrfasthttp

go 1.21
go 1.22

require (
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/valyala/fasthttp v1.49.0
)

Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrgin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/newrelic/go-agent/v3/integrations/nrgin

// As of Dec 2019, the gin go.mod file uses 1.12:
// https://github.com/gin-gonic/gin/blob/master/go.mod
go 1.21
go 1.22

require (
github.com/gin-gonic/gin v1.9.1
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrgorilla/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module github.com/newrelic/go-agent/v3/integrations/nrgorilla

// As of Dec 2019, the gorilla/mux go.mod file uses 1.12:
// https://github.com/gorilla/mux/blob/master/go.mod
go 1.21
go 1.22

require (
// v1.7.0 is the earliest version of Gorilla using modules.
github.com/gorilla/mux v1.7.0
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrgraphgophers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module github.com/newrelic/go-agent/v3/integrations/nrgraphgophers

// As of Jan 2020, the graphql-go go.mod file uses 1.13:
// https://github.com/graph-gophers/graphql-go/blob/master/go.mod
go 1.21
go 1.22

require (
// graphql-go has no tagged releases as of Jan 2020.
github.com/graph-gophers/graphql-go v1.3.0
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrgraphqlgo/example/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/newrelic/go-agent/v3/integrations/nrgraphqlgo/example

go 1.21
go 1.22

require (
github.com/graphql-go/graphql v0.8.1
github.com/graphql-go/graphql-go-handler v0.2.3
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
github.com/newrelic/go-agent/v3/integrations/nrgraphqlgo v1.0.0
)

Expand Down
4 changes: 2 additions & 2 deletions v3/integrations/nrgraphqlgo/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/newrelic/go-agent/v3/integrations/nrgraphqlgo

go 1.21
go 1.22

require (
github.com/graphql-go/graphql v0.8.1
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
)


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

go 1.21
go 1.22

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.4
github.com/newrelic/go-agent/v3 v3.36.0
github.com/newrelic/go-agent/v3 v3.37.0
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.65.0
Expand Down
Loading

0 comments on commit f6ca661

Please sign in to comment.