function doWorkInTransaction({ api, agent, transactionName }, cb) {
  api.startBackgroundTransaction(transactionName, () => {
    const transaction = agent.tracer.getTransaction()
    const ctx = agent.tracer.getContext()
    // need to end the tx after doing a bunch of child operations
    transaction.handledExternally = true
    forceTxName(ctx, transactionName)
    cb(transaction)
  })
}
Creates a background transaction and forces the name for easier assertion.

@param {object} params to function
@param {object} params.api agent api
@param {object} params.agent agent instance
@param {string} params.transactionName name of transaction to force
@param {function} cb function to call within transaction and passes active tx handle