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!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...