Configuration
Configuration File
Configuration file content:
{
"license_key" : "***",
"audit" : false,
"log_file_count": 5,
"log_file_size": 10,
"loglevel": "info",
"listen" : "127.0.0.1:38000",
"collectors" : [
"172.16.101.7:7685"
]
}
"license_key":
License key, user identification.
"audit":
Audit mode: Default value: false. When set to true, audit mode is enabled, and more audit logs will be output in the log file.
"log_file_count":
Maximum number of log files, default is 10.
"log_file_size":
Maximum size of a log file in MB. If the set value is exceeded, logs will be automatically renamed as log.1, log.2~log.n. Default: 10
"listen":
TCP port for the transaction aggregation module to listen on, used for communication between the SDK module and the aggregation module.
"collectors":
List of collector servers.
Configuration File Path
The installation command can specify the installation path via the parameter “--prefix”. If --prefix is not specified, the default installation path is: /usr/lib/tingyun3/csdk. By default, the configuration file path is: /usr/lib/tingyun3/csdk/conf/transagent.json. You can also access the configuration file via a symlink: /etc/tingyun3/csdk/transagent.json.
Log Path
The daemon process log has three settings, read in the following priority:
- Environment variable TINGYUN_CTAGENT_LOGS.
- If the environment variable fails, use the logFile in the configuration file.
- If the configuration file does not specify a log path, the default log output path is /usr/lib/tingyun3/csdk/logs/trans_agent.log.
libtingyun.so Search Path
Applications with the SDK embedded will dynamically load libtingyun.so at startup. If libtingyun.so fails to load, the application will run as if it is not instrumented. The search path for dynamically loading the SO:
-
Environment variable TINGYUN_LIBS TINGYUN_LIBS is a colon-separated path search list. The application's static library will use this environment variable to search for libtingyun3.x64.so at startup.
-
Environment variable LD_LIBRARY_PATH If libtingyun3.x64.so is not found in TINGYUN_LIBS, LD_LIBRARY_PATH is used to search for libtingyun3.x64.so.
-
If not found above, the application runs without the Agent. Note: After installing with the bin package, a symlink to /usr/lib/tingyun3/csdk/lib/libtingyun.so will be created in the same path as libc.so.