       .finally => @_emitEvent "finished", { context, id, notification }
       .asCallback context.done
 
-      return
+      return promise() unless @apm.active
+
+      transactionName = "test-transact" #_.compact([@config.topic, @_subscriptionName(), folderScript()]).join "-"
+      newrelic().startBackgroundTransaction transactionName, "test", () ->
+        promise()
+        .tapCatch (err) -> newrelic().noticeError err
+
+      
 
     _emitEvent: (eventName, value) =>
       @emit eventName, value if ENABLE_EVENTS

      $promise = Promise.method(@runner) notification, context
      $promise = $promise.timeout(@timeout, "processor timeout") if @timeout?

      $promise
      .tap => @_emitEvent "successful", { context, id, notification }
      .catch (error) =>
        throw error unless error instanceof NonRetryable

EventEmitter = require "events"
Promise = require "bluebird"
uuid = require "uuid/v4"
newrelic = _.once -> require("newrelic")

ENABLE_EVENTS = process.env.ENABLE_EVENTS isnt "false"

