Splunk AppDynamics

C++ SDK Agent configuration

ArunkumarKarmeg
Explorer

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;
} 

 

Labels (1)
Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...