To quickly identify performance bottlenecks and troubleshoot cluster issues, enable Tracing Analysis for the cluster API server to record details of its request interactions. When enabled, trace data from the API server is automatically reported to Managed Service for OpenTelemetry, which provides monitoring data such as tracing details and real-time topology.
If you are new to tracing, see Basic concepts to learn the fundamentals.
Prerequisites
-
You have an ACK managed Pro cluster that runs Kubernetes 1.28 or later. If you need to upgrade your cluster, see Manually upgrade a cluster.
-
You have activated and authorized Managed Service for OpenTelemetry. For more information, see Get started.
Managed Service for OpenTelemetry provides tools for distributed applications, including end-to-end trace reconstruction, request volume statistics, trace topology, and application dependency analysis.
When you use this feature, Managed Service for OpenTelemetry charges you for the volume of observability data in addition to the fees for your ACK cluster. For information about the free quota and pricing details of Managed Service for OpenTelemetry, see Billing.
You can configure API server parameters to enable Tracing Analysis and set its sample rate. Once configured, the Managed Service for OpenTelemetry console displays detailed trace data.
Step 1: Enable Tracing Analysis for the API server
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons.
-
In the Core Components area, click Configuration in the lower-right corner of the Kube API Server card.
-
In the configuration panel, locate the enableTrace and samplingRatePerMillion parameters and set their values as described below.
Before you enable enableTrace, ensure that Managed Service for OpenTelemetry is activated and available in the current region.
-
enableTrace: Enables Tracing Analysis for the API server.
-
samplingRatePerMillion: Specifies the number of requests to sample for every one million requests. You can set the sample rate based on the cluster's workload.
For example, a value of 1000000 corresponds to a 100% sample rate, where all requests are sampled and recorded. A value of 100000 corresponds to a 10% sample rate, and 10000 corresponds to a 1% sample rate.
-
Step 2: View trace data in OpenTelemetry
-
Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, click Applications.
-
At the top of the page, select a region, and then click the apiserver application.
-
Trace Explorer tab: Displays traces and the application topology for API server requests.
For detailed information about each tab, see Application details.
-
In the search box in the upper-left corner of the page, enter
resources.k8s.cluster.name : "your_cluster_id"to view traces from a specific cluster.You can obtain the cluster ID from the Cluster List page.
-
Click a trace ID in the trace list to view the details of a specific API server trace, including the topology view, the number of services involved, and the number of API calls.
-
-
Provided Services tab: Displays metrics for API server endpoints, such as the number of requests, number of errors, and average latency.
-
Dependencies tab: Displays metrics for the API server's external dependencies, such as the number of requests, number of errors, and average latency when accessing etcd.
-
Related documentation
To monitor trace data from your cluster's data plane components, see Enable Tracing Analysis for data plane components.