cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Agent Tier name does not match AppDynamics Dashboard

Freddy.Chung
Wanderer
Hi,
I am new to AppDynamics.
I am trying to use AppDynamics to monitor some key features of my application.
I am using the C++ sdk and I have some behaviors that I don't understand.
 
appd-events.png
How is it possible that the agent tier differs from the Tier displayed by AppDynamics (which is here ISS-MCSMS-APP) ?
 
As my application is able to gather all the information of a transaction in one place, I create the corresponding transaction for AppDynamics agent in a single thread (it means that I overwrite the start time and the processing time for the bt and all exit calls).
As my application has a lot of different services, I want to display the response time per service (Tier).
Therefore, I declare them as backend and for each transaction, I add the exit calls. However, I don't want them to be displayed as outside webservice, so I add a appd_context for each Tier, and I create a correlated bt for each exit call.
 
The code looks like:
 

 

    // pcp_trans is a pointer of transaction that gather all information
    appd_bt_handle lc_btHandle = appd_bt_begin( "MY_BT", NULL);
    appd_bt_override_start_time_ms(lc_btHandle, pcp_trans->startTime);
    appd_bt_override_time_ms(lc_btHandle, pcp_trans->procTime);
    for (auto& lcr_extCall: pcp_trans->exitCall) // vector of exit calls
    {
      appd_exitcall_handle lc_ecHandle = appd_exitcall_begin(lc_btHandle, lcr_extCall.name); // name is the Tier name
      appd_exitcall_override_start_time_ms(lc_ecHandle, lcr_extCall.startTime);
      appd_exitcall_override_time_ms(lc_ecHandle, lcr_extCall.procTime);

      /*
       * Here I add the appd context for the service if the context does not exist
       */
      const char* lz_corhdr = appd_exitcall_get_correlation_header(lc_ecHandle);
      appd_bt_handle lc_corrbtHandle = appd_bt_begin_with_app_context(lcr_extCall.context, "MY_BT", lz_corhdr);
      appd_bt_override_start_time_ms(lc_corrbtHandle, lcr_extCall.startTime);
      appd_bt_override_time_ms(lc_corrbtHandle, lcr_extCall.procTime);
      appd_bt_end(lc_corrbtHandle);
      appd_exitcall_end(lc_ecHandle);
    }
    appd_bt_end(lc_btHandle);
  }

 

Can someone tell me what's wrong ?

Thanks.

3 REPLIES 3

Ryan.Paredez
Community Manager

Hi @Freddy.Chung,

I tried finding some hopefully helpful AppD documentation. https://docs.appdynamics.com/appd/22.x/latest/en/application-monitoring/install-app-server-agents/ag...

Let me know if that helps out or not.


Thanks,

Ryan, Cisco AppDynamics Community Manager




Found something helpful? Click the Accept as Solution button to help others find answers faster.

Liked something? Click the Thumbs Up button.



Check out Observabiity in Action

new deep dive videos weekly in the Knowledge Base.

Hi @Ryan.Paredez ,

Thank you for the reply !

Unfortunately, the documentation you sent to me does not help me to solve the issue. 

In the first place, I thought that my Tier names were wrongly valued because of the '-' symbol. But after renaming the Tier without any '-' symbol, I still get the error.

FreddyChung_0-1684742211184.png

In the notification section, I have a lot of Unknown Events. Is there any way to get more details of those unknown events ?

FreddyChung_2-1684742543096.png

After using AppDynamics C++ context for each tier (and calling appd_bt_begin_with_app_context), it seems that the AppDynamics controller is not able to identify the business transaction.

If I remove all appd_bt_begin_with_app_context calls, I get a result with all backend grouping under the same remote icon in the dashboard flow map and the business transaction is correctly recognized by the controller. This seems to work pretty well and I am not getting any errors.

FreddyChung_0-1684746941764.png

However, I am not very satisfied with the flow map because I don't want all of my tiers to be displayed as a remote backend server under one icon.

I add here the code I use to add appd context for each tier. The context name is just a concatenation of application, tier and node name.

 

    if (ms_appdContexts.count(contextName)) // ms_appdContexts is a set of string
      return;
    appd_context_config* lcp_cfg = appd_context_config_init(contextName);
    appd_context_config_set_app_name(lcp_cfg, applicationName);
    appd_context_config_set_tier_name(lcp_cfg, tierName);
    appd_context_config_set_node_name(lcp_cfg, nodeName);

    appd_context_config_set_controller_host(lcp_cfg, cfg->appdControllerHost());
    appd_context_config_set_controller_port(lcp_cfg, cfg->appdControllerPort());
    appd_context_config_set_controller_account(lcp_cfg, cfg->appdControllerAccount());
    appd_context_config_set_controller_access_key(lcp_cfg, cfg->appdControllerAccessKey());
    if (cfg->appdControllerUseSsl())
      appd_context_config_set_controller_use_ssl(lcp_cfg, 1);

    appd_sdk_add_app_context(lcp_cfg);
    ms_appdContexts.insert(contextName);

 

I do not think that this part of the code is the problem as it is pretty much a copy-paste of the AppD C++ SDK example.

In the log file of each agent being launched, I don't see any specific error. The tier name is what I expected and the connection is established.

FreddyChung_3-1684744184792.png

So I am a little bit lost. I don't know which part of my code produced the error. 

Is it allowed to call the appd_bt_begin_with_app_context right after appd_exitcall_begin in the same code ? Is the method appd_sdk_add_app_context a synchronous call ? 

Best regards,

Freddy CHUNG

After some tries, it seems that the C++ SDK does not support defining multiple contexts inside the same thread for the same application and node but different tiers. 

In my test, I removed all the business transaction parts so the agent is not sending anything. The only thing the code does is to add new contexts with the same application and node name but a different tier name. And the controller still produces the same error.

Is there anyway to display each backend as a tier in the flow map without the need to create a new thread for each tier ?

Freddy CHUNG.