Splunk AppDynamics

C++ native client monitoring does not work

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I am evaluating AppDynamcis. I am trying to connect to a SaaS controller from C++ native application. Followed all the instructions as mentioned here 

https://docs.appdynamics.com/pages/viewpage.action?pageId=42583437#UsingtheC/C++AgentSDK-addheaderto...

Added header

Added code to initialize sdk

Performed multiple BT 

but i can't see anything in the UI dashboard. Can someone please tell me what am I doing wrong??

const char APP_NAME[] = "Test1";
const char TIER_NAME[] = "T1";
const char NODE_NAME[] = "Node1";
const char CONTROLLER_HOST[] = "my.saas.appdynamics.com";
const int CONTROLLER_PORT = 443;
const char CONTROLLER_ACCOUNT[] = "myaccount";
const char CONTROLLER_ACCESS_KEY[] = "myaccesskey";
const int CONTROLLER_USE_SSL = 1;

int main()
{
    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);    
    const int initRC = appd_sdk_init(cfg);

    if (initRC) {
        std::cerr << "Error: sdk init: " << initRC;
        return -1;
    }

    for (int i = 0; i < 10; ++i)
    {
        // start the "Checkout" transaction
        const appd_bt_handle btHandle = appd_bt_begin("Checkout", nullptr);

        Sleep(1000);

        appd_bt_add_error(btHandle, APPD_LEVEL_ERROR, "Failed", true);

        // end the transaction
        appd_bt_end(btHandle);
    }
    
    appd_sdk_term();

    return 0;
}
Labels (3)
1 Solution

CommunityUser
Splunk Employee
Splunk Employee
Hi,
The issue was license :). You need additional license for C++ SDK even for Python. I somehow traced it in the error log file.
So yeah, init will return success but nothing will work.

View solution in original post

CommunityUser
Splunk Employee
Splunk Employee

Hi,

The same for me, what is really weird, that appd inint method returns success. BTW were you able in the meantime resolve the issue.

Best Regards

Matej

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Hi,
The issue was license :). You need additional license for C++ SDK even for Python. I somehow traced it in the error log file.
So yeah, init will return success but nothing will work.
Get Updates on the Splunk Community!

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...

From Alert to Resolution: How Splunk Observability Helps SREs Navigate Critical ...

It's 3:17 AM, and your phone buzzes with an urgent alert. Wire transfer processing times have spiked, and ...