Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

startWebTransaction handler isn't receiving arguments


#1

I’m trying to upgrade the agent from v2 to v5.6. I followed this below help docs to troubleshoot, but it’s not clear to me. It doesn’t say when the transaction is started.

https://docs.newrelic.com/docs/agents/nodejs-agent/troubleshooting/troubleshoot-message-consumers

I tried something like this, but the arguments channel & message were always undefined. It used to work with old method createWebTransaction.

redis.on('message', newrelic.startWebTransaction(transactionName, (channel, message) => {
    transaction = newrelic.getTransaction();
    console.log('Receive message %s from channel %s', message, channel);
    transaction.end();
  });
); 

FYI, I’m using pubsub feature in ioredis library (similar to socketio).


#2

Hi @sriram1,

I think you’ll find the following tutorial helpful in instrumenting that code:

We actually have a shim specifically for instrumenting Message Brokers. Using that shim will help make sure the transactions are instrumented correctly, and that they are labeled appropriately in the UI. Could you check that documentation out and let us know if it addresses your use-case?

~ @jlangdon


#3

I’m using redis pub/sub which is not supported by the shim. The documentation doesn’t help me either.


#4

Hi sriram,

To troubleshoot this particular issue, I’ll be requesting some information from you that may be security sensitive. To avoid that exposure, I’ll be creating a ticket for you. Once we solve this issue through that medium, I’ll get back to our forum to explain how we solved the issue.

Expect to hear from us soon.