Skip to content
11 changes: 7 additions & 4 deletions lib/instrumentation/cassandra-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function initialize(_agent, cassandra, _moduleName, shim) {
ClientProto,
['connect', 'shutdown'],
function operationSpec(shim, _fn, name) {
return new OperationSpec({ callback: shim.LAST, name })
return new OperationSpec({ callback: shim.LAST, name, promise: true })
}
)

Expand All @@ -39,7 +39,8 @@ module.exports = function initialize(_agent, cassandra, _moduleName, shim) {
'_execute',
new QuerySpec({
query: shim.FIRST,
callback: shim.LAST
callback: shim.LAST,
promise: true
})
)

Expand All @@ -64,7 +65,8 @@ module.exports = function initialize(_agent, cassandra, _moduleName, shim) {
'_innerExecute',
new QuerySpec({
query: shim.FIRST,
callback: shim.LAST
callback: shim.LAST,
promise: true
})
)

Expand Down Expand Up @@ -109,7 +111,8 @@ module.exports = function initialize(_agent, cassandra, _moduleName, shim) {
'batch',
new QuerySpec({
query: findBatchQueryArg,
callback: shim.LAST
callback: shim.LAST,
promise: true
})
)
}
Expand Down
Loading