What is end-to-end tracing?
OceanBase Database is a distributed system with complex call links. When a timeout issue occurs, O&M engineers cannot quickly determine whether the issue is caused by OceanBase Database components or the network. They can only analyze the issue based on experience and OceanBase Database logs. To improve diagnostics efficiency, OceanBase Database V4.2.5 introduces a new end-to-end diagnostics feature. It traces the information of user SQL requests executed by different components at different stages of the entire call link, and presents the information to users in a visual way. This way, users can quickly identify the causes of issues.
End-to-end tracing paths
Two paths are involved in end-to-end diagnostics:
- An application sends a request to OceanBase Database Proxy (ODP) through a client, such as Java Database Connectivity (JDBC) or Oracle Call Interface (OCI), ODP forwards the request to an OBServer node, and then the OBServer node returns the result to the application.
- An application directly sends a request to an OBServer node through a client, and then the OBServer node returns the result to the application.
The end-to-end diagnostics feature is intended to diagnose all components in the two paths.
To use this feature, you need to enable it by using the DBMS_MONITOR package and specify the sampling rate and log level based on your business needs. After this feature is enabled, it records end-to-end traces of all SQL statements that match the specified rules.
End-to-end diagnostics logs
Details of end-to-end diagnostics logs, namely trace logs, are determined by the data access path. If you connect to the database through ODP, trace information is recorded in log files of both ODP and the OBServer node. If you directly connect to an OBServer node, trace information is recorded only in the log file of the OBServer node. The trace log file in ODP is named obproxy_trace.log, and that on the OBServer node is named trace.log. Each log file is at most 256 MB in size. When the log file reaches the maximum size, the system creates a new log file and archives the old one. The number of archive files is controlled by specific parameters. Excess files are automatically deleted.
O&M engineers can collect and analyze all trace logs to track the execution time and other information of each transaction or SQL query across the entire call link. This feature provides reference for accurate diagnostics and greatly improves O&M efficiency.