Skip to content

Commit

Permalink
Merge branch 'develop' into test_ignore_txn
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-swilloughby committed Apr 4, 2024
2 parents 8ece2e6 + 2cea34d commit f1a554c
Show file tree
Hide file tree
Showing 57 changed files with 102 additions and 124 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 3.31.0
### Added
* Integration packages to instrument AI model invocations (see below).
* New package nrawsbedrock v1.0.0 introduced to instrument calls to Amazon Bedrock Runtime Client API `InvokeModel` and `InvokeModelWithResponseStream` calls. Also provides a simple one-step method which invokes stream invocations and harvests the response stream data for you.
* New package nropenai v1.0.0 introduced to instrument calls to OpenAI using `NRCreateChatCompletion`, `NRCreateChatCompletionStream`, and `NRCreateEmbedding` calls.
* Dockerfile in the `examples/server` sample app which facilitates the easy creation of a containerized ready-to-run sample app for situations where that makes testing easier.

### Fixed
* `.Ignore` was not ignoring transaction. Fixes [Issue #845](https://github.com/newrelic/go-agent/issues/845).
* Added nil error check in wrap function. Fixes [Issue #862](https://github.com/newrelic/go-agent/issues/862).
* `WrapBackgroundCore` background logger was not sending logs to New Relic. Fixes [Issue #859](https://github.com/newrelic/go-agent/issues/859).
* Corrected pgx5 integration example which caused a race condition. Thanks to @WillAbides! Fixes [Issue #855](https://github.com/newrelic/go-agent/issues/855).
* Updated third-party library versions due to reported security or other supportability issues:
* `github.com/jackc/pgx/v5` to 5.5.4 in `nrpgx5` integration
* `google.gopang.org/protobuf` to 1.33.0 in `nrmicro` and `nrgrpc` integrations
* `github.com/jackc/pgx/v4` to 4.18.2 in `nrpgx` integration

### AI Monitoring Configuration
New configuration options are available specific to AI monitoring. These settings include:
* `AIMonitoring.Enabled`, configured via `ConfigAIMonitoring.Enabled(`_bool_`)` [default `false`]
* `AIMonitoring.Streaming.Enabled`, configured via `ConfigAIMonitoringStreamingEnabled(`_bool_`)` [default `true`]
* `AIMonitoring.Content.Enabled`, configured via `ConfigAIMonitoringContentEnabled(`_bool_`)` [default `true`]

### AI Monitoring Public API Methods
Two new AI monitoring related public API methods have been added, as methods of the `newrelic.Application` value returned by `newrelic.NewApplication`:
* [app.RecordLLMFeedbackEvent](https://pkg.go.dev/github.com/newrelic/go-agent/v3/newrelic#Application.RecordLLMFeedbackEvent)
* [app.SetLLMTokenCountCallback](https://pkg.go.dev/github.com/newrelic/go-agent/v3/newrelic#Application.SetLLMTokenCountCallback)

### AI Monitoring
New Relic AI monitoring is the industry’s first APM solution that provides end-to-end visibility for AI Large Language Model (LLM) applications. It enables end-to-end visibility into the key components of an AI LLM application. With AI monitoring, users can monitor, alert, and debug AI-powered applications for reliability, latency, performance, security and cost. AI monitoring also enables AI/LLM specific insights (metrics, events, logs and traces) which can easily integrate to build advanced guardrails for enterprise security, privacy and compliance.

AI monitoring offers custom-built insights and tracing for the complete lifecycle of an LLM’s prompts and responses, from raw user input to repaired/polished responses. AI monitoring provides built-in integrations with popular LLMs and components of the AI development stack. This release provides instrumentation for [OpenAI](https://pkg.go.dev/github.com/newrelic/go-agent/v3/integrations/nropenai)
and [Bedrock](https://pkg.go.dev/github.com/newrelic/go-agent/v3/integrations/nrawsbedrock).

When AI monitoring is enabled with `ConfigAIMonitoringEnabled(true)`, the agent will now capture AI LLM related data. This data will be visible under a new APM tab called AI Responses. See our [AI Monitoring documentation](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring/) for more details.

### 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](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.



## 3.30.0
### Added
* Updated the depencency on nrsecurityagent to 1.0.0.
Expand Down
7 changes: 0 additions & 7 deletions v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ require (
google.golang.org/grpc v1.56.3
)

require (
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/logWriter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/logWriter
go 1.19

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/nrlogrus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrlogrus
go 1.19

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

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

go 1.19

require github.com/newrelic/go-agent/v3 v3.30.0
require github.com/newrelic/go-agent/v3 v3.31.0


replace github.com/newrelic/go-agent/v3 => ../../..
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/nrwriter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrwriter

go 1.19

require github.com/newrelic/go-agent/v3 v3.30.0
require github.com/newrelic/go-agent/v3 v3.31.0


replace github.com/newrelic/go-agent/v3 => ../../..
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/nrzap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrzap
go 1.19

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/nrzerolog/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrzerolog
go 1.19

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/logcontext-v2/zerologWriter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext-v2/zerologWriter
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrwriter v1.0.0
github.com/rs/zerolog v1.27.0
)
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/logcontext/nrlogrusplugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module github.com/newrelic/go-agent/v3/integrations/logcontext/nrlogrusplugin
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
// v1.4.0 is required for for the log.WithContext.
github.com/sirupsen/logrus v1.4.0
)
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nramqp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/nramqp
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/rabbitmq/amqp091-go v1.9.0
)
replace github.com/newrelic/go-agent/v3 => ../..
23 changes: 1 addition & 22 deletions v3/integrations/nrawsbedrock/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,8 @@ require (
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/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect
github.com/aws/smithy-go v1.20.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)

replace github.com/newrelic/go-agent/v3 => ../..
2 changes: 1 addition & 1 deletion v3/integrations/nrawssdk-v1/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go 1.19
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.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrawssdk-v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/lambda v1.24.5
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.10
github.com/aws/smithy-go v1.13.3
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrb3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/newrelic/go-agent/v3/integrations/nrb3

go 1.19

require github.com/newrelic/go-agent/v3 v3.30.0
require github.com/newrelic/go-agent/v3 v3.31.0


replace github.com/newrelic/go-agent/v3 => ../..
2 changes: 1 addition & 1 deletion v3/integrations/nrecho-v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrecho-v4/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go 1.19

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


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrelasticsearch-v7/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go 1.19

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


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrfasthttp/examples/client-fasthttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module client-example
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/newrelic/go-agent/v3/integrations/nrfasthttp v1.0.0
github.com/valyala/fasthttp v1.49.0
)
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrfasthttp/examples/server-fasthttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module server-example
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/newrelic/go-agent/v3/integrations/nrfasthttp v1.0.0
github.com/valyala/fasthttp v1.49.0
)
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrfasthttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/go-agent/v3/integrations/nrfasthttp
go 1.19

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrgin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go 1.19

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


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrgorilla/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.19
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.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrgraphgophers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.19
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.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrgraphqlgo/example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
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.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/newrelic/go-agent/v3/integrations/nrgraphqlgo v1.0.0
)

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrgraphqlgo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/graphql-go/graphql v0.8.1
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
14 changes: 1 addition & 13 deletions v3/integrations/nrgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,13 @@ 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.30.0
github.com/newrelic/go-agent/v3 v3.31.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.56.3
google.golang.org/protobuf v1.33.0
)

require (
github.com/dlclark/regexp2 v1.9.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/k2io/hookingo v1.0.5 // indirect
github.com/newrelic/csec-go-agent v1.0.0 // indirect
golang.org/x/arch v0.4.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

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

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrhttprouter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.19
require (
// v1.3.0 is the earliest version of httprouter using modules.
github.com/julienschmidt/httprouter v1.3.0
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrlambda/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/aws/aws-lambda-go v1.41.0
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrlogrus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module github.com/newrelic/go-agent/v3/integrations/nrlogrus
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrlogrus v1.0.0
// v1.1.0 is required for the Logger.GetLevel method, and is the earliest
// version of logrus using modules.
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrlogxi/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.19
require (
// 'v1', at commit aebf8a7d67ab, is the only logxi release.
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrmicro/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.19
require (
github.com/golang/protobuf v1.5.4
github.com/micro/go-micro v1.8.0
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
google.golang.org/protobuf v1.33.0
)

Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrmongo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module github.com/newrelic/go-agent/v3/integrations/nrmongo
go 1.19

require (
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
// mongo-driver does not support modules as of Nov 2019.
go.mongodb.org/mongo-driver v1.10.2
)
Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrmssql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/microsoft/go-mssqldb v0.19.0
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down
2 changes: 1 addition & 1 deletion v3/integrations/nrmysql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
// v1.5.0 is the first mysql version to support gomod
github.com/go-sql-driver/mysql v1.6.0
// v3.3.0 includes the new location of ParseQuery
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-agent/v3 v3.31.0
)


Expand Down

0 comments on commit f1a554c

Please sign in to comment.