This topic describes how to enable and disable full link tracking for a tenant, and how to use the feature.
Prerequisites
Full link tracking parameters have been enabled. For more information, see Configure trace query parameters.
Background information
After you enable full link tracking, you can perform the following operations:
- Choose Log Service > Trace Query and view the trace diagnostic results of abnormal SQL statements. For more information, see Trace query.
- Choose SQL Diagnostics > SlowSQL > SQL Sampling and view traces. For more information, see Slow SQL diagnostics.
OceanBase Cloud Platform (OCP) V4.2.1 allows you to configure full link tracking at the tenant and session levels. You can enable or disable this feature for specified objects as needed.
Notice
Under the default full link tracking configurations, the performance metrics of OceanBase Database can decrease by about 2%. We recommend that you disable this feature in performance-sensitive scenarios.
Configure full link tracking for a tenant
You can enable or disable full link tracking for a tenant on its Overview page.
Note
- You cannot enable full link tracking for a business tenant that is in the Locked state. However, this limitation does not apply to the sys tenant.
- You can still lock a business tenant for which the full link tracking feature is enabled at the tenant or session level. After the business tenant is locked, the full link tracking feature is disabled by default.
- You can still delete a business tenant for which the full link tracking feature is enabled at the tenant or session level.
- If you disable full link tracking for a tenant, this feature is disabled for all sessions in the tenant.
- Changes in full link tracking configurations of a tenant apply to all sessions in this tenant.
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the Tenants list, find the target tenant and click its name to go to the Tenant Details page.
In the upper-right corner, click Full link tracking configuration.
Configure the parameters.
Parameter Description Trace Level The supported trace levels are Level 1, Level 2, and Level 3. Level 1 indicates the module level and Level 3 is the most refined. Sampling Ratio Value range: 0 to 100%. Default value: 10%. Sampled Content - ALL: All sampled traces are recorded in the log file.
- ONLY_SLOW_QUERY: All sampled traces that belong to slow queries are recorded in the log file, and other traces are discarded. In this strategy, the server identifies slow queries based on the default threshold.
- SAMPLE_AND_SLOW_QUERY: All traces of slow queries are recorded in the log file and sampling logs are recorded at a frequency of 0.01%. Force flush must be enabled.
Enable By default, full link tracking configurations are enabled. If full link tracking configurations are disabled, the full link tracking feature is disabled.
Configure full link tracking for a session
You can enable or disable full link tracking for a session on the Session Management page.
- If the full link tracking feature is enabled at the tenant level, you can disable the feature for a single session.
- Changes in full link tracking configurations at the session level apply only to the current session.
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the Tenants list, find the target tenant and click its name to go to the Tenant Details page.
In the left-side navigation pane, select Session Management.
In the session list of the tenant, find the target session and choose More > Full link tracking configuration.
Configure the parameters.
Parameter Description Trace Level The supported trace levels are Level 1, Level 2, and Level 3. Level 1 indicates the module level and Level 3 is the most refined. Sampling Ratio Value range: 0 to 100%. Default value: 10%. Sampled Content - ALL: All sampled traces are recorded in the log file.
- ONLY_SLOW_QUERY: All sampled traces that belong to slow queries are recorded in the log file, and other traces are discarded. In this strategy, the server identifies slow queries based on the default threshold.
- SAMPLE_AND_SLOW_QUERY: All traces of slow queries are recorded in the log file and sampling logs are recorded at a frequency of 0.01%. Force flush must be enabled.
Enable By default, full link tracking configurations are enabled. If full link tracking configurations are disabled, the full link tracking feature is disabled.