Skip to content

Commit

Permalink
feat: added support for batch write dynamodb (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamohanan committed Aug 31, 2023
1 parent f7ff4ad commit a276b84
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions packages/collector/test/tracing/cloud/aws-sdk/v3/dynamodb/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,36 @@ const operationParams = {
}
}
}
},
batchWriteItem: {
RequestItems: {
[tableName]: [
{
PutRequest: {
Item: {
year: {
N: '2002'
},
title: {
S: 'batch record 1'
}
}
}
},
{
PutRequest: {
Item: {
year: {
N: '2003'
},
title: {
S: 'batch record 2'
}
}
}
}
]
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const availableOperations = [
'getItem',
'scan',
'query',
'deleteItem'
'deleteItem',
'batchWriteItem'
];

const retryTime = config.getTestTimeout() * 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class InstanaAWSDynamoDB extends InstanaAWSProduct {

if (params && params.TableName) {
spanData.table = params.TableName;
} else if (params && params.RequestItems) {
spanData.table = Object.keys(params.RequestItems).toString();
}

return spanData;
Expand Down

0 comments on commit a276b84

Please sign in to comment.