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

"nil dereference" when using DAX #287

Closed
odannyc opened this issue Mar 24, 2021 · 5 comments · Fixed by #291
Closed

"nil dereference" when using DAX #287

odannyc opened this issue Mar 24, 2021 · 5 comments · Fixed by #291

Comments

@odannyc
Copy link
Contributor

odannyc commented Mar 24, 2021

Description

When using DAX to query a dynamodb table and instrumenting the request with newrelic, I get a nil reference panic on this line:
https://github.com/newrelic/go-agent/blob/master/_integrations/nrawssdk/v1/nrawssdk.go#L28

internal.EndSegment(ctx, req.HTTPResponse.Header)

I stepped/debugged through a request and it looks like HTTPResponse is nil for DAX requests.

Steps to Reproduce

  1. Create a dynamodb request
  2. Instrument the handlers with the newrelic helper nrawssdk.InstrumentHandlers(&req.Handlers)
  3. Send the request with DAX

Expected Behavior

Request sends without error and I see the trace in New Relic

NR Diag results

panic!

Your Environment

  • github.com/newrelic/go-agent/v3/integrations/nrawssdk-v1 v1.0.0

Reproduction case

Additional context

@odannyc
Copy link
Contributor Author

odannyc commented Mar 30, 2021

@RichVanderwal

Please let me know if there is any additional information you need.

Thank you.

@RichVanderwal
Copy link
Contributor

Hi @odannyc , thanks for your patience here! You're on the short list of support issues for us to get back to, and we'll be taking a look at this soon.

@RichVanderwal
Copy link
Contributor

After some review, we've decided to check for a nil value here and skip adding the AWS Request ID span attribute if there's no response. PR forthcoming!

@odannyc
Copy link
Contributor Author

odannyc commented Apr 16, 2021

Hi @RichVanderwal ,

I have a PR open for this issue here:

#291

@RichVanderwal
Copy link
Contributor

Hello @odannyc ! We've included your PR in the maintenance release of the Go Agent today. Let us know if you have any feedback, questions, or comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants