Dynamic Languages (Node.JS, Python, PHP, C/C++, Webserver Agent)

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the correlationHeader to post with an AWS SNS/SQS message

Creator

Getting the correlationHeader to post with an AWS SNS/SQS message

I am having trouble getting the correlationHeader when posting to AWS SNS.

I want to pass this with my message so it can be used with appd.parseCorrelationInfo(correlationHeader) when the message is pulled off the SQS queue.

 

Here is what I have so far:

 

var txn = appd.startTransaction("sending-to-queue");
    var exit = txn.startExitCall({
              exitType: 'EXIT_HTTP',
              label: "unique-message-label",
              identifyingProperties: {
                HOST: "arn:aws:sns:us-west-2:123123123123:test-topic",
                PORT: 443
              }
          });
    var correlationHeader = txn.createCorrelationInfo(exit, true);

 

Here is the error message I'm getting

 

detected backendInfo: ["EXIT_HTTP","HOST","sns.us-west-2.amazonaws.com","PORT","443"]
appdynamics v4.2.15.0 (21-05-2017 17:40:13.849): CorrelationHeader.build: disabling correlation header generated: notxdetect=true

 

I'm not sure that I'm using the exit code correctly but couldn't find any examples, any help would be great.

https://docs.appdynamics.com/display/PRO42/Node.js+Agent+API+Reference#Node.jsAgentAPIReference-Time...

 

 

Getting the correlationHeader to post with an AWS SNS/SQS message
5 REPLIES 5
AppDynamics Team

Re: Getting the correlationHeader to post with an AWS SNS/SQS message

Hi Avantassel,

 

From provided error messages, I suspect that the custom transaction might still be unregistered with the controller and hence proper correlation header is not generated. Could you keep on generating continuous load on the application and see if the error disabling correlation header generated goes away and replaced by a proper header? 

 

If this doesn’t work, could you put debug:true setting in your agent configuration block and restart your application. With this setting in place, agent will output debug level logs in application STDOUT / STDERR. Please capture those logs and upload them on the SFTP location, which I have shared with you on a private message, so we can analyse them and assist further on this.

 

Best Regards,

Piyush

Creator

Re: Getting the correlationHeader to post with an AWS SNS/SQS message

 

Hi,

I do have debug on, here is the registration, the header is not genereated after more than a dozen continuous calls.

 

var appd = require('appdynamics');
appd.profile({
      debug: true,
      controllerHostName: "",
      controllerPort: 443,
      accountName: "",
      accountAccessKey: module.exports.appdynamics.accessKey,
      applicationName: "",
      tierName: "",
      nodeName: "",
      controllerSslEnabled: true
    });

 

Highlighted
AppDynamics Team

Re: Getting the correlationHeader to post with an AWS SNS/SQS message

Hi There,

 

Could you please capture the application STDERR / STDOUT output and upload it to the SFTP details I have provided you over a private message. Could you also upload the zip of /tmp/appd folder from the environment so we can analyse these and assist further.

 

Best Regards,

Piyush

Creator

Re: Getting the correlationHeader to post with an AWS SNS/SQS message

did you get a chance to look at the logs that I uploaded?

AppDynamics Team

Re: Getting the correlationHeader to post with an AWS SNS/SQS message

Hi There,

 

Sorry for the delayed update on this. I have parsed through the logs as well as data on your controller. I could not see any BTs getting detected so I suspect the BT registration is not going through. The logs too doesn't have any information on this.

 

It looks like you are running with cluster module so could you please verify if you have appdynamics agent config in master as well as all the worker processes? If not, please set these properties at both the places, restart the application and drive some constant load on the application.

 

Best Regards,

Piyush