Skip to content

update newrelic to v3 (GO-15926)#21

Open
John Fallis (jfallis) wants to merge 1 commit into
masterfrom
GO-15926-update-nr
Open

update newrelic to v3 (GO-15926)#21
John Fallis (jfallis) wants to merge 1 commit into
masterfrom
GO-15926-update-nr

Conversation

@jfallis

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the NewRelic Go agent from v2 to v3, addressing breaking changes in the API and modernizing the codebase. The migration includes updating imports, changing transaction types from interfaces to pointers, and removing error handling for the AddAttribute method which no longer returns errors in v3.

  • Updated NewRelic Go agent dependencies from v2 to v3
  • Changed transaction types from interface to pointer references
  • Replaced interface{} with any type alias throughout codebase

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updated NewRelic dependencies to v3 and added required integrations
step_function_handler.go Updated imports, transaction type, and AddAttribute method
sqs_handler.go Updated imports, transaction type, and replaced interface{} with any
s3_handler.go Updated imports, transaction type, and simplified AddAttribute
handlers.go Updated NewRelic import and replaced interface{} with any
dynamodb_handler.go Updated imports, transaction type, and simplified AddAttribute
cloudwatch_handler.go Updated imports, transaction type, and simplified AddAttribute
apigw_handler_test.go Replaced interface{} with any type alias
apigw_handler.go Updated imports, transaction type, and simplified AddAttribute
apigw_ca_handler.go Updated imports, transaction type, and simplified AddAttribute
golangci.yml Added comprehensive linting configuration
Makefile Enhanced with help system and lint target

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread step_function_handler.go
"github.com/rs/zerolog"
)

// StepEvent represents a generic event for AWS Step Functions.

Copilot AI Oct 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 13 describes StepEvent but is placed above the StepContext type definition. This comment should be moved to line 31 where StepEvent is actually defined, or updated to describe StepContext.

Suggested change
// StepEvent represents a generic event for AWS Step Functions.

Copilot uses AI. Check for mistakes.
Comment thread handlers.go
return strings.Join(errorParts, "; ")
}

// ToJSON returns the JSON representation of the Err.

Copilot AI Oct 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 54 mentions 'ToJSON' method but is placed above the ErrInternalServer variable declaration. This comment appears to be misplaced and should either be removed or moved to the appropriate location.

Suggested change
// ToJSON returns the JSON representation of the Err.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants