When troubleshooting latency or diagnosing unexpected behavior in a Kubernetes cluster, API Server traces reveal how requests flow through the control plane. Enable API Server tracing in your ACK managed cluster to automatically export distributed traces to Managed Service for OpenTelemetry, where you can inspect request timelines, service topology, and dependency details.
If you are new to distributed tracing concepts such as traces, spans, and sampling, see Basic concepts.
Prerequisites
Before you begin, make sure that you have:
An ACK managed cluster Pro edition running Kubernetes 1.28 or later. To upgrade, see Manually upgrade a cluster
Activated and authorized Managed Service for OpenTelemetry
Managed Service for OpenTelemetry provides tools for distributed applications, including complete trace restoration, request volume statistics, trace topology, and application dependency analysis.
Billing
API Server tracing incurs two types of charges:
| Charge type | Details |
|---|---|
| ACK cluster fees | Pro edition cluster billing |
| Managed Service for OpenTelemetry fees | Based on the volume of trace data collected. A free quota is included. See Billing description for details |
Enable tracing for the API Server
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, click the name of the target cluster. In the left-side navigation pane, choose Operations > Add-ons.
In the Core Components area, find the Kube API Server card and click Configure.
Set the following parameters:
Parameter Description enableTrace Turn on tracing for the API Server. samplingRatePerMillion The number of requests to sample per one million requests. Adjust this value based on cluster load. 
The following table shows common sampling rate values:
Value Sampling rate Meaning 1000000100% Every request is traced 10000010% 1 in 10 requests is traced 100001% 1 in 100 requests is traced
View trace data in the OpenTelemetry console
Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, click Application List.
Select the region at the top of the page, then click the application named apiserver.
Explore the available tabs:
Trace Analysis -- Displays API Server request traces and application topology.
To filter traces for a specific cluster, enter
resources.k8s.cluster.name : "<cluster-id>"in the search box. Find your cluster ID in the ACK cluster list.Click a trace ID to view the full request timeline, including the topology, number of services involved, and number of interfaces invoked.
Provided Services -- Shows request count, fault count, and average response time for each API Server endpoint.
Dependent Services -- Lists external components that the API Server calls (such as etcd), with request count, fault count, and average response time.
For a complete guide to all tabs, see Application details.
Related topics
Enable tracing for data plane components to get end-to-end visibility across both control plane and data plane.