Hi Team, I am currently working on to monitor a C++ application in Appdynamics. Have instrumented other applications Java,PHP , .Net , but this looks totally different. As per the documentation,...
See more...
Hi Team, I am currently working on to monitor a C++ application in Appdynamics. Have instrumented other applications Java,PHP , .Net , but this looks totally different. As per the documentation, these were the 3 steps, but bit confused. 1.Add the AppDynamics Header File to the Application - This is fine, will add this line #include <path_to_SDK>/sdk_lib/appdynamics.h in the application source code. But is there any specific file name or instructions for this? 2.Initialize the Controller Configuration - The values mentioned below does these need to be updated in c++ application source code and call the Appdynamics SDK. If so does both these codes to be included and how toc all the SDK. const char APP_NAME[] = "SampleC";
const char TIER_NAME[] = "SampleCTier1";
const char NODE_NAME[] = "SampleCNode1";
const char CONTROLLER_HOST[] = "controller.somehost.com";
const int CONTROLLER_PORT = 8080;
const char CONTROLLER_ACCOUNT[] = "customer1";
const char CONTROLLER_ACCESS_KEY[] = "MyAccessKey";
const int CONTROLLER_USE_SSL = 0; struct appd_config* cfg = appd_config_init(); // appd_config_init() resets the configuration object and pass back an handle/pointer
appd_config_set_app_name(cfg, APP_NAME);
appd_config_set_tier_name(cfg, TIER_NAME);
appd_config_set_node_name(cfg, NODE_NAME);
appd_config_set_controller_host(cfg, CONTROLLER_HOST);
appd_config_set_controller_port(cfg, CONTROLLER_PORT);
appd_config_set_controller_account(cfg, CONTROLLER_ACCOUNT);
appd_config_set_controller_access_key(cfg, CONTROLLER_ACCESS_KEY);
appd_config_set_controller_use_ssl(cfg, CONTROLLER_USE_SSL); . 3.Initialize the SDK - This I understand to be called from the source code to trigger the SDK, correct me if I am wrong. If my undertsnading is correct, any specific instructions toa dd these lines in the code? int initRC = appd_sdk_init(cfg);
if (initRC) {
std::cerr << "Error: sdk init: " << initRC << std::endl;
return -1;
}