-
Notifications
You must be signed in to change notification settings - Fork 301
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
Handle attributes in nrpkgerrors #441
Conversation
Ensure that if an error contains attributes, that they are safely coppied into the new error created in the wrap function.
@@ -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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin' good!
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.