Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle attributes in nrpkgerrors #441

Merged

Conversation

iamemilio
Copy link
Contributor

Details

Fixes #409. nrpkgerrors.Wrap() now checks if the error it is passed has attributes, and if it does, copies them into the New Relic error it creates.

Ensure that if an error contains attributes, that they are safely
coppied into the new error created in the wrap function.
@iamemilio iamemilio changed the base branch from master to develop January 26, 2022 14:44
@iamemilio iamemilio marked this pull request as draft January 26, 2022 15:08
@iamemilio iamemilio marked this pull request as ready for review January 27, 2022 15:52
@@ -902,7 +902,7 @@ func TestTrObsOKSendBackoffNo(t *testing.T) {
}
// If the default backoff of 15 seconds is used, the second span will not
// be received in time.
if !s.DidSpansArrive(t, 2, 4*time.Second) {
if !s.DidSpansArrive(t, 2, 8*time.Second) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd love to find a better solution to this. I've increased this timeout myself in a past PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 this is a very naive attempt at solving the problem. I would really like to understand why it is happening in the first place.

Copy link

Choose a reason for hiding this comment

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

Can we set a variable for the integer here?

Copy link
Contributor

@RichVanderwal RichVanderwal left a comment

Choose a reason for hiding this comment

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

Lookin' good!

@RichVanderwal RichVanderwal added this to Awaiting User Input in Go Engineering Board via automation Feb 16, 2022
@RichVanderwal RichVanderwal moved this from Awaiting User Input to Code Review in Go Engineering Board Feb 16, 2022
@RichVanderwal RichVanderwal removed this from Code Review in Go Engineering Board Feb 16, 2022
@nr-swilloughby nr-swilloughby merged commit 399106a into newrelic:develop May 18, 2022
@nr-swilloughby nr-swilloughby mentioned this pull request May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v3/integrations/nrpkgerrors: support errorAttributer interface
4 participants