Conviva Client Library
 
Loading...
Searching...
No Matches
app_tracker.h
1//
2// Copyright (c) 2014 Conviva. All rights reserved.
3//
4
8
9
15
16#ifndef APPTRACKER_H
17#define APPTRACKER_H
18
19#include "ccl_dictionary.h"
20
21#define CAT_MAX_APP_NAME_LENGTH 64
22#define CAT_MAX_USER_ID_LENGTH 64
23#define CAT_MAX_IID_LENGTH 64
24
25#define CCL_APP_MAX_SCREEN_NAME_LEN 1024
26#define CCL_APP_MAX_SCREEN_ID_LEN 38
27
28// Network Reequest Info Constants
29#define CAT_MAX_URL_LENGTH 1024
30#define CAT_MAX_METHOD_LENGTH 15
31#define CAT_MAX_BODY_LENGTH 10000 // 10 KB
32
33#define CAT_MEMORY_ERROR -1
34#define CAT_MUTEX_ERROR -2
35#define CAT_INPUT_ERROR -3
36#define CAT_TIMER_ERROR -4
37#define CAT_ERROR 0
38#define CAT_SUCCESS 1
39
40#define CAT_MAX_APP_BUILD_LENGTH 64
41#define CAT_MAX_APP_VERSION_LENGTH 64
42
43
57
68
70typedef struct cat_anr_info {
72 uint64_t anr_start;
76
78typedef struct cat_app_info {
84
89 uint64_t app_load_end;
91
92
94typedef enum cat_error_lang {
95 CAT_ERROR_LANG_UNKNOWN = 0, // Unknown language
121
122#define STR_MAX_LEN_1024 1024
123#define STR_MAX_LEN_2048 2048
124#define STR_MAX_LEN_8192 8192
125
127typedef struct cat_app_error_info {
133
156
157
159typedef struct cat_screen_info {
163
170 uint64_t load_start;
172 uint64_t load_end;
174
175
179int cat_set_user_id(const char* uid);
180
185int cat_send_custom_event(const char *name, ccl_dictionary_t *attributes);
186
191
196
202
208
214
221
228
229
236
243
250int cat_clear_custom_tags(char *keys[], int key_count);
251
257
258
259
260#endif /* APPTRACKER_H*/
261
int cat_pause_tracker(void)
pause the app tracker to stop monitoring
int cat_track_app_install(void)
notifies the app install event, normally calls on fresh launch after install or upgrade
#define CAT_MAX_METHOD_LENGTH
Definition app_tracker.h:30
struct cat_network_request_info cat_network_request_info_t
Use to set the network request details.
int cat_track_anr(cat_anr_info_t *anr_info)
send the ANR(application not responding) event, shall send on unrecovered ANRs on next launch.
struct cat_anr_info cat_anr_info_t
Application Not Responding details.
struct cat_app_info cat_app_info_t
Use to set the application details.
#define CAT_MAX_APP_VERSION_LENGTH
Definition app_tracker.h:41
int cat_clear_custom_tags(char *keys[], int key_count)
clear the specific custom tags with keys
int cat_set_custom_tags(ccl_dictionary_t *tags)
set the custom tags
#define CAT_MAX_URL_LENGTH
Definition app_tracker.h:29
int cat_track_screen_view(cat_screen_info_t *screen_info)
send the screen info
struct cat_app_error_info cat_app_error_info_t
Application Error Information.
int cat_send_custom_event(const char *name, ccl_dictionary_t *attributes)
send custom event to eco
cat_error_lang
Language of the error message.
Definition app_tracker.h:94
int cat_set_application_info(cat_app_info_t *app_info)
set application info, can set right after the tracker creation.
struct cat_screen_info cat_screen_info_t
Screen details.
int cat_track_network_request(cat_network_request_info_t *nw_info)
send the network request info to eco
#define CAT_MAX_APP_BUILD_LENGTH
Definition app_tracker.h:40
enum cat_error_lang cat_error_lang_t
Language of the error message.
int cat_set_user_id(const char *uid)
Sets the user ID for ECO.
int cat_resume_tracker(void)
resume the app tracker to start monitoring again
int cat_track_application_error(cat_app_error_info_t *error_info)
send the application error to eco, use this API for realtime error tracking.
int cat_clear_all_custom_tags()
clear all custom tags
@ CAT_ERROR_LANG_GOLANG
Definition app_tracker.h:101
@ CAT_ERROR_LANG_KOTLIN
Definition app_tracker.h:98
@ CAT_ERROR_LANG_PHP
Definition app_tracker.h:103
@ CAT_ERROR_LANG_SWIFT
Definition app_tracker.h:106
@ CAT_ERROR_LANG_RUBY
Definition app_tracker.h:100
@ CAT_ERROR_LANG_ACTIONSCRIPT
Definition app_tracker.h:110
@ CAT_ERROR_LANG_CRYSTAL
Definition app_tracker.h:117
@ CAT_ERROR_LANG_SCALA
Definition app_tracker.h:97
@ CAT_ERROR_LANG_ERLANG
Definition app_tracker.h:115
@ CAT_ERROR_LANG_CPLUSPLUS
Definition app_tracker.h:108
@ CAT_ERROR_LANG_C
Definition app_tracker.h:107
@ CAT_ERROR_LANG_CSHARP
Definition app_tracker.h:109
@ CAT_ERROR_LANG_PONY
Definition app_tracker.h:118
@ CAT_ERROR_LANG_ELIXIR
Definition app_tracker.h:116
@ CAT_ERROR_LANG_NIM
Definition app_tracker.h:119
@ CAT_ERROR_LANG_RUST
Definition app_tracker.h:112
@ CAT_ERROR_LANG_UNKNOWN
Definition app_tracker.h:95
@ CAT_ERROR_LANG_CLOJURE
Definition app_tracker.h:114
@ CAT_ERROR_LANG_PYTHON
Definition app_tracker.h:104
@ CAT_ERROR_LANG_GROOVY
Definition app_tracker.h:99
@ CAT_ERROR_LANG_HASKELL
Definition app_tracker.h:113
@ CAT_ERROR_LANG_JAVA
Definition app_tracker.h:96
@ CAT_ERROR_LANG_LUA
Definition app_tracker.h:111
@ CAT_ERROR_LANG_OBJECTIVEC
Definition app_tracker.h:105
@ CAT_ERROR_LANG_JAVASCRIPT
Definition app_tracker.h:102
struct ccl_dictionary ccl_dictionary_t
Definition ccl_dictionary.h:18
Application Not Responding details.
Definition app_tracker.h:70
uint64_t anr_start
Definition app_tracker.h:72
char * anr_reason
Definition app_tracker.h:74
Application Error Information.
Definition app_tracker.h:127
char * exception_name
Definition app_tracker.h:150
int thread_id
Definition app_tracker.h:138
char * cause_stack_trace
Definition app_tracker.h:142
char * thread_name
Definition app_tracker.h:136
int line_column
Definition app_tracker.h:146
char * stack_trace
Definition app_tracker.h:140
char * file_name
Definition app_tracker.h:152
cat_error_lang_t error_lang
Definition app_tracker.h:130
int line_number
Definition app_tracker.h:144
int is_fatal
Definition app_tracker.h:154
char * error_msg
Definition app_tracker.h:132
char * class_name
Definition app_tracker.h:148
Use to set the application details.
Definition app_tracker.h:78
uint64_t app_load_start
Definition app_tracker.h:87
uint64_t app_load_end
Definition app_tracker.h:89
char app_build[CAT_MAX_APP_BUILD_LENGTH]
Definition app_tracker.h:81
char app_version[CAT_MAX_APP_VERSION_LENGTH]
Definition app_tracker.h:83
Use to set the network request details.
Definition app_tracker.h:45
uint64_t request_timestamp
Definition app_tracker.h:54
void * response_header
Definition app_tracker.h:62
void * request_header
Definition app_tracker.h:60
void * response_body
Definition app_tracker.h:66
char method[CAT_MAX_METHOD_LENGTH]
Definition app_tracker.h:50
uint64_t response_timestamp
Definition app_tracker.h:56
char target_url[CAT_MAX_URL_LENGTH]
Definition app_tracker.h:48
int response_code
Definition app_tracker.h:52
void * request_body
Definition app_tracker.h:64
Screen details.
Definition app_tracker.h:159
uint64_t load_start
Definition app_tracker.h:170
char * screen_name
Definition app_tracker.h:162
uint64_t load_end
Definition app_tracker.h:172
char * screen_transition_type
Definition app_tracker.h:168
char * screen_type
Definition app_tracker.h:166