AppDynamics C/C++ SDK
21.3
Reference documentation for the C/C++ SDK.
|
|
Go to the documentation of this file.
17 #define APPD_API __declspec(dllexport)
19 #define APPD_API __attribute__((visibility("default")))
83 struct appd_context_config;
683 #define APPD_BACKEND_HTTP "HTTP"
684 #define APPD_BACKEND_DB "DB"
685 #define APPD_BACKEND_CACHE "CACHE"
686 #define APPD_BACKEND_RABBITMQ "RABBITMQ"
687 #define APPD_BACKEND_WEBSERVICE "WEB_SERVICE"
688 #define APPD_BACKEND_JMS "JMS"
689 #define APPD_BACKEND_WEBSPHEREMQ "WEBSPHERE_MQ"
701 APPD_API void appd_backend_declare(const char* type, const char* unregistered_name);
853 int mark_bt_as_error);
1030 #define APPD_CORRELATION_HEADER_NAME "singularityheader"
1063 const char* message,
int mark_bt_as_error);
1179 const char* class_name,
const char* method_name,
1180 const char* file,
int line_number);
1220 const char* referrer_url,
const char* path);
1263 const char* event_sub_type,
1264 const char* summary);
1284 const char* property_name,
1285 const char* property_value);
1304 const char* detail_name,
1305 const char* detail_value);
1340 const std::string& method_name,
const std::string& file_path, int32_t line_number,
1351 template <
typename HandleT>
1363 bool mark_bt_as_error =
true) = 0;
1366 bool mark_bt_as_error =
true)
1368 add_error(level, message.c_str(), mark_bt_as_error);
1424 init(name, correlation_header);
1450 BT(
const std::string& name,
const std::string& correlation_header)
1453 init(name.c_str(), correlation_header.c_str());
1497 bool mark_bt_as_error =
true)
1529 void init(
const char* name,
const char* correlation_header = NULL)
1652 bool mark_bt_as_error =
true)
1702 const char* file,
int line_number)
1746 const std::string& file_path, int32_t line_number,
1779 CallGraph(
BT&
bt,
const std::string& class_name,
const std::string& method_name,
1780 const std::string& file_path, int32_t line_number, int32_t time_msec,
1784 line_number, time_msec, frame_type))
1802 const std::unique_ptr<CallGraphElement>
m_root;
1861 const std::string& eventSubType,
const std::string& summary,
1862 const std::map<std::string, std::string>& properties,
1863 const std::map<std::string, std::string>& details)
1866 eventSubType.c_str(), summary.c_str());
1872 for (
const auto& property : properties) {
1874 property.second.c_str());
1880 for (
const auto& detail : details) {
1882 detail.second.c_str());
1919 #ifndef __has_attribute
1920 #define __has_attribute(x) 0
1923 #if __STDC_VERSION__ >= 199901L || __cplusplus > 199711L
1924 #define APPD_FUNCTION_NAME __func__
1925 #elif __GNUC__ >= 2 || defined(_MSC_VER)
1926 #define APPD_FUNCTION_NAME __FUNCTION__
1928 #define APPD_FUNCTION_NAME "unknown"
1931 #if defined(__cplusplus)
1933 #define APPD_AUTO_FRAME(bt) \
1934 appd::sdk::Frame __appd_f##__COUNTER__((bt), APPD_FRAME_TYPE_CPP, nullptr, APPD_FUNCTION_NAME, \
1937 #elif __has_attribute(cleanup) || __GNUC__ >= 4
1939 #define APPD_AUTO_FRAME(bt) \
1940 appd_frame_handle __appd_f##__COUNTER__ __attribute__((cleanup(appd_frame_end))) = \
1941 appd_frame_begin((bt), APPD_FRAME_TYPE_CPP, NULL, APPD_FUNCTION_NAME, __FILE__, __LINE__)
void store(const char *guid)
Definition: appdynamics.h:1611
bool add_to_snapshot() const
Definition: appdynamics.h:1794
@ APPD_LEVEL_WARNING
Definition: appdynamics.h:832
Definition: appdynamics.h:1564
BT & bt()
Definition: appdynamics.h:1797
bool m_borrowed_handle
Definition: appdynamics.h:1373
APPD_API void appd_config_set_flush_metrics_on_shutdown(struct appd_config *cfg, int enable)
APPD_API void appd_config_set_controller_access_key(struct appd_config *cfg, const char *key)
@ APPD_FRAME_TYPE_CPP
Definition: appdynamics.h:1151
BT(const std::string &name)
Definition: appdynamics.h:1435
APPD_API void appd_context_config_set_controller_http_proxy_password(struct appd_context_config *context_cfg, const char *pwd)
@ APPD_LOG_LEVEL_ERROR
Definition: appdynamics.h:100
APPD_API int appd_backend_set_identifying_property(const char *backend, const char *key, const char *value)
APPD_API appd_bt_handle appd_bt_begin(const char *name, const char *correlation_header)
@ APPD_CLUSTERROLLUP_TYPE_COLLECTIVE
Definition: appdynamics.h:1100
Definition: appdynamics.h:1685
@ APPD_LOG_LEVEL_DEBUG
Definition: appdynamics.h:97
APPD_API char appd_bt_is_snapshotting(appd_bt_handle bt)
Frame(const Frame &)=delete
@ APPD_EVENT_SEVERITY_WARNING
Definition: appdynamics.h:1239
~ExitCall()
Definition: appdynamics.h:1601
APPD_API void appd_context_config_set_controller_host(struct appd_context_config *context_cfg, const char *host)
APPD_API appd_bt_handle appd_bt_get(const char *guid)
Definition: appdynamics.h:1764
APPD_API void appd_bt_add_user_data(appd_bt_handle bt, const char *key, const char *value)
HandleWrapper(const HandleWrapper &)
CallGraphElement()=default
~Frame()
Definition: appdynamics.h:1713
APPD_API void appd_config_set_init_timeout_ms(struct appd_config *cfg, const int time)
void add_error(enum appd_error_level level, const std::string &message, bool mark_bt_as_error=true)
Definition: appdynamics.h:1365
APPD_API void appd_config_set_controller_certificate_file(struct appd_config *cfg, const char *file)
APPD_API void appd_config_set_controller_http_proxy_host(struct appd_config *cfg, const char *host)
void store(const std::string &guid)
Definition: appdynamics.h:1616
APPD_API void appd_config_set_controller_certificate_dir(struct appd_config *cfg, const char *dir)
virtual void add_error(enum appd_error_level level, const char *message, bool mark_bt_as_error=true)
Definition: appdynamics.h:1651
APPD_API appd_event_handle appd_custom_event_start(const char *application_context, enum appd_event_severity severity, const char *event_sub_type, const char *summary)
APPD_API void appd_context_config_set_controller_port(struct appd_context_config *context_cfg, const unsigned short port)
Definition: appdynamics.h:1408
virtual CallGraphElement & add_child(const std::string &class_name, const std::string &method_name, const std::string &file_path, int32_t line_number, int32_t time_msec, appd_frame_type frame_type)=0
APPD_API void appd_custom_metric_report(const char *application_context, const char *metric_path, long value)
APPD_API void appd_config_set_tier_name(struct appd_config *cfg, const char *tier)
bool enable_snapshot() const
Definition: appdynamics.h:1491
APPD_API int appd_bt_enable_snapshot(appd_bt_handle bt)
APPD_API void appd_config_set_analytics_host(struct appd_config *cfg, const char *host)
APPD_API void appd_context_config_set_controller_certificate_dir(struct appd_context_config *context_cfg, const char *dir)
APPD_API void appd_exitcall_store(appd_exitcall_handle exitcall, const char *guid)
APPD_API void appd_config_set_app_name(struct appd_config *cfg, const char *app)
void * appd_event_handle
Definition: appdynamics.h:57
void store(const std::string &guid)
Definition: appdynamics.h:1481
@ APPD_EVENT_SEVERITY_ERROR
Definition: appdynamics.h:1240
const std::unique_ptr< CallGraphElement > m_root
Definition: appdynamics.h:1802
BT(const std::string &name, const std::string &correlation_header)
Definition: appdynamics.h:1450
void add_user_data(const std::string &key, const std::string &value)
Definition: appdynamics.h:1513
@ APPD_LOG_LEVEL_WARN
Definition: appdynamics.h:99
APPD_API void appd_config_set_controller_use_ssl(struct appd_config *cfg, const unsigned int ssl)
HandleT handle()
Definition: appdynamics.h:1359
APPD_API void appd_config_set_logging_max_num_files(struct appd_config *cfg, const unsigned int num)
APPD_API int appd_custom_event_add_property(appd_event_handle event_handle, const char *property_name, const char *property_value)
CallGraphElement & operator=(const CallGraphElement &)=delete
bool is_snapshotting() const
Definition: appdynamics.h:1486
Definition: appdynamics.h:1353
APPD_API void appd_context_config_set_controller_http_proxy_host(struct appd_context_config *context_cfg, const char *host)
virtual CallGraphElement & add_exit_call(appd_exitcall_handle exit_call, int32_t time_msec)=0
virtual ~HandleWrapper()=default
Definition: appdynamics.h:1836
APPD_API void appd_context_config_set_controller_http_proxy_password_file(struct appd_context_config *context_cfg, const char *file)
void set_url(const char *url)
Definition: appdynamics.h:1521
@ APPD_TIMEROLLUP_TYPE_SUM
Definition: appdynamics.h:1082
appd_time_rollup_type
Definition: appdynamics.h:1073
APPD_API appd_bt_handle appd_bt_begin_with_app_context(const char *context, const char *name, const char *correlation_header)
@ APPD_LEVEL_ERROR
Definition: appdynamics.h:832
appd_frame_handle m_frame_handle
Definition: appdynamics.h:1717
APPD_API void appd_config_set_logging_min_level(struct appd_config *cfg, enum appd_config_log_level lvl)
CallGraphElement & root() const
Definition: appdynamics.h:1796
const BT & bt() const
Definition: appdynamics.h:1798
APPD_API void appd_bt_end(appd_bt_handle bt)
appd_event_severity
Definition: appdynamics.h:1237
virtual void add_error(enum appd_error_level level, const char *message, bool mark_bt_as_error=true)=0
BT(const char *name, const char *correlation_header=NULL)
Definition: appdynamics.h:1422
APPD_API void appd_config_set_controller_http_proxy_port(struct appd_config *cfg, const unsigned short port)
@ APPD_LEVEL_NOTICE
Definition: appdynamics.h:832
APPD_API void appd_context_config_set_node_name(struct appd_context_config *context_cfg, const char *node)
APPD_API const char * appd_eum_get_cookie(appd_bt_handle bt, int https, int short_form, const char *referrer_url, const char *path)
@ APPD_LOG_LEVEL_TRACE
Definition: appdynamics.h:96
appd_config_log_level
Definition: appdynamics.h:95
APPD_API void appd_exitcall_end(appd_exitcall_handle exitcall)
APPD_API void appd_config_set_analytics_enabled(struct appd_config *cfg, const unsigned short enable)
Definition: appdynamics.h:1330
APPD_API void appd_config_set_logging_log_dir(struct appd_config *cfg, const char *dir)
Frame & operator=(const Frame &)=delete
HandleWrapper()
Definition: appdynamics.h:1355
ExitCall(BT &bt, const char *backend)
Definition: appdynamics.h:1574
appd_error_level
Definition: appdynamics.h:831
APPD_API void appd_context_config_set_tier_name(struct appd_context_config *context_cfg, const char *tier)
CallGraph & operator=(const CallGraph &)=delete
void * appd_frame_handle
Definition: appdynamics.h:48
int set_details(const char *details)
Definition: appdynamics.h:1639
#define APPD_API
Definition: appdynamics.h:19
APPD_API bool appd_callgraph_add_to_snapshot(const appd::sdk::CallGraph *callgraph)
APPD_API int appd_sdk_init(const struct appd_config *config)
APPD_API void appd_context_config_set_controller_use_ssl(struct appd_context_config *context_cfg, unsigned int ssl)
APPD_API void appd_config_set_controller_port(struct appd_config *cfg, const unsigned short port)
APPD_API int appd_backend_prevent_agent_resolution(const char *backend)
Event(const Event &)=delete
APPD_API struct appd_context_config * appd_context_config_init(const char *context)
APPD_API int appd_sdk_add_app_context(struct appd_context_config *context_cfg)
appd_frame_type
Definition: appdynamics.h:1150
APPD_API void appd_bt_add_error(appd_bt_handle bt, enum appd_error_level level, const char *message, int mark_bt_as_error)
APPD_API void appd_config_set_controller_http_proxy_password_file(struct appd_config *cfg, const char *file)
APPD_API int appd_custom_event_add_detail(appd_event_handle event_handle, const char *detail_name, const char *detail_value)
void init(BT &bt, const char *backend)
Definition: appdynamics.h:1658
bool report()
Definition: appdynamics.h:1895
@ APPD_HOLEHANDLING_TYPE_REGULAR_COUNTER
Definition: appdynamics.h:1106
virtual void add_error(enum appd_error_level level, const char *message, bool mark_bt_as_error=true)
Definition: appdynamics.h:1496
CallGraph(BT &bt, const std::string &class_name, const std::string &method_name, const std::string &file_path, int32_t line_number, int32_t time_msec, appd_frame_type frame_type)
Definition: appdynamics.h:1779
APPD_API int appd_custom_event_end(appd_event_handle event_handle)
ExitCall(BT &bt, const std::string &backend)
Definition: appdynamics.h:1584
APPD_API void appd_context_config_set_controller_account(struct appd_context_config *context_cfg, const char *acct)
Definition: appdynamics.h:1726
@ APPD_TIMEROLLUP_TYPE_AVERAGE
Definition: appdynamics.h:1077
APPD_API void appd_config_set_controller_http_proxy_password(struct appd_config *cfg, const char *pwd)
APPD_API void appd_frame_end(appd_bt_handle bt, appd_frame_handle frame)
APPD_API void appd_bt_set_url(appd_bt_handle bt, const char *url)
BT & m_bt
Definition: appdynamics.h:1716
APPD_API void appd_context_config_set_controller_http_proxy_port(struct appd_context_config *context_cfg, const unsigned short port)
APPD_API void appd_custom_metric_add(const char *application_context, const char *metric_path, enum appd_time_rollup_type time_rollup_type, enum appd_cluster_rollup_type cluster_rollup_type, enum appd_hole_handling_type hole_handling_type)
@ APPD_HOLEHANDLING_TYPE_RATE_COUNTER
Definition: appdynamics.h:1105
APPD_API appd_exitcall_handle appd_exitcall_get(const char *guid)
HandleT m_handle
Definition: appdynamics.h:1372
HandleWrapper & operator=(const HandleWrapper &)
Frame(BT &bt, appd_frame_type frame_type, const char *class_name, const char *method_name, const char *file, int line_number)
Definition: appdynamics.h:1701
APPD_API int appd_exitcall_set_details(appd_exitcall_handle exitcall, const char *details)
std::string correlation_header
Definition: appdynamics.h:1668
void add_user_data(const char *key, const char *value)
Definition: appdynamics.h:1505
bool m_loaded_correlation_header
Definition: appdynamics.h:1667
APPD_API void appd_config_set_node_name(struct appd_config *cfg, const char *node)
appd_event_handle m_eventHandle
Definition: appdynamics.h:1908
appd_hole_handling_type
Definition: appdynamics.h:1104
APPD_API void appd_config_set_analytics_port(struct appd_config *cfg, const unsigned short port)
APPD_API void appd_config_set_controller_account(struct appd_config *cfg, const char *acct)
const std::string & get_correlation_header()
Definition: appdynamics.h:1621
@ APPD_LOG_LEVEL_INFO
Definition: appdynamics.h:98
APPD_API appd_frame_handle appd_frame_begin(appd_bt_handle bt, enum appd_frame_type frame_type, const char *class_name, const char *method_name, const char *file, int line_number)
APPD_API const char * appd_exitcall_get_correlation_header(appd_exitcall_handle exitcall)
APPD_API void appd_bt_store(appd_bt_handle bt, const char *guid)
APPD_API appd::sdk::CallGraphElement * appd_construct_callgraph_element(const appd::sdk::CallGraph *callgraph, const std::string &class_name, const std::string &method_name, const std::string &file_path, int32_t line_number, int32_t time_msec, appd_frame_type frame_type)
CallGraphElement(const CallGraphElement &)=delete
@ APPD_CLUSTERROLLUP_TYPE_INDIVIDUAL
Definition: appdynamics.h:1095
void * appd_bt_handle
Definition: appdynamics.h:30
int set_details(const std::string &details)
Definition: appdynamics.h:1645
BT(appd_bt_handle bt)
Definition: appdynamics.h:1464
APPD_API void appd_context_config_set_controller_certificate_file(struct appd_context_config *context_cfg, const char *file)
virtual ~CallGraphElement()=default
APPD_API void appd_config_getenv(struct appd_config *cfg, const char *prefix)
void init(const char *name, const char *correlation_header=NULL)
Definition: appdynamics.h:1529
bool m_success
Definition: appdynamics.h:1907
APPD_API void appd_config_set_controller_http_proxy_username(struct appd_config *cfg, const char *user)
HandleWrapper(HandleT handle)
Definition: appdynamics.h:1356
void * appd_exitcall_handle
Definition: appdynamics.h:39
@ APPD_LOG_LEVEL_FATAL
Definition: appdynamics.h:101
CallGraph(const CallGraph &)=delete
APPD_API void appd_exitcall_add_error(appd_exitcall_handle exitcall, enum appd_error_level level, const char *message, int mark_bt_as_error)
BT & m_bt
Definition: appdynamics.h:1801
@ APPD_TIMEROLLUP_TYPE_CURRENT
Definition: appdynamics.h:1087
~BT()
Definition: appdynamics.h:1466
APPD_API struct appd_config * appd_config_init()
ExitCall(appd_exitcall_handle exitcall)
Definition: appdynamics.h:1596
appd_cluster_rollup_type
Definition: appdynamics.h:1091
Event(const std::string &applicationContext, appd_event_severity severity, const std::string &eventSubType, const std::string &summary, const std::map< std::string, std::string > &properties, const std::map< std::string, std::string > &details)
Definition: appdynamics.h:1860
APPD_API void appd_context_config_set_app_name(struct appd_context_config *context_cfg, const char *app)
APPD_API void appd_context_config_set_controller_http_proxy_username(struct appd_context_config *context_cfg, const char *user)
void set_url(const std::string &url)
Definition: appdynamics.h:1526
APPD_API void appd_config_set_controller_host(struct appd_config *cfg, const char *host)
APPD_API void appd_config_set_logging_max_file_size_bytes(struct appd_config *cfg, const unsigned int size)
APPD_API appd_exitcall_handle appd_exitcall_begin(appd_bt_handle bt, const char *backend)
APPD_API void appd_config_set_analytics_use_ssl(struct appd_config *cfg, const unsigned short ssl)
APPD_API int appd_backend_add(const char *backend)
const HandleT handle() const
Definition: appdynamics.h:1360
@ APPD_EVENT_SEVERITY_INFO
Definition: appdynamics.h:1238
APPD_API void appd_sdk_term()
void store(const char *guid)
Definition: appdynamics.h:1476
APPD_API void appd_context_config_set_controller_access_key(struct appd_context_config *context_cfg, const char *key)