question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed integrating with AWS DAX

See original GitHub issue

Hi, I am currently integrating newrelic agent into our application.

I noticed that if I use AWS DAX as a replacement of DynamoDB client, I always got an error on every DB manipulation.

const dax = new AmazonDaxClient({ region: 'us-east-1', endpoints: ['some.endpoint'] });
const dbClient = new AWS.DynamoDB.DocumentClient({ service: dax });
await dbClient.query({ ... }).promise();
Cannot read property 'host' of undefined
error: TypeError: Cannot read property 'host' of undefined
    at DocumentClient.wrapOperation (/home/ec2-user/async_worker/node_modules/@newrelic/aws-sdk/lib/dynamodb.js:64:39)
    at DocumentClient.opRecorder (/home/ec2-user/async_worker/node_modules/newrelic/lib/shim/datastore-shim.js:411:24)
    at DocumentClient.wrapper [as get] (/home/ec2-user/async_worker/node_modules/newrelic/lib/shim/shim.js:927:33)
    ...

But a regular DynamoDB client works fine.

const ddb = new AWS.DynamoDB({ region: 'us-east-1' });
const dbClient = new AWS.DynamoDB.DocumentClient({ service: ddb });
await dbClient.query({ ... }).promise();

Tried @newrelic/aws-sdk but the issue remains.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelgoincommented, Feb 20, 2020

A new version of the agent has been deployed including the new version of the aws-sdk instrumentation. Please let us know if you have further issues.

1reaction
michaelgoincommented, Jan 21, 2020

@seoker The aws-sdk wasn’t rolled into the agent for auto-install until version 6.1.0. So any earlier version should avoid that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DAX and DynamoDB consistency models - AWS Documentation
If a write to DynamoDB fails for any reason, including throttling, the item is not cached in DAX. The exception for the failure...
Read more >
Troubleshoot “No endpoints available” errors in DAX
"No endpoints available" errors occur when the client doesn't have a network route to any nodes of the DAX cluster.
Read more >
In-memory acceleration with DynamoDB Accelerator (DAX)
Get faster performance and lower latency when reading from Amazon DynamoDB with DAX, a managed, in-memory, write-through cache you can deploy for demanding ......
Read more >
Managing DAX clusters - Amazon DynamoDB
DAX is integrated with AWS CloudTrail, allowing you to audit DAX cluster activities. You can use CloudTrail logs to view all the changes...
Read more >
Modifying an existing application to use DAX
If you already have a Java application that uses Amazon DynamoDB, you can modify it so that it can access your DynamoDB Accelerator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found