Amazon EKS — Distributed Tracing
Distributed Tracing
Tracing follows a request through multiple microservices, showing latency at each step. AWS X-Ray and OpenTelemetry are the main options on EKS.
Why Tracing Matters
Without Tracing:
User: "The app is slow"
You: "Which service? I have 20."
With Tracing:
User → API Gateway (5ms) → Auth Service (10ms) → User Service (500ms!)
↑ Found it!
AWS X-Ray
# X-Ray DaemonSet
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: xray-daemon
spec:
template:
spec:
containers:
- name: xray-daemon
image: amazon/aws-xray-daemon
ports:
- containerPort: 2000
protocol: UDP
OpenTelemetry (Recommended)
OpenTelemetry is the vendor-neutral standard. AWS Distro for OpenTelemetry (ADOT) is the recommended collector:
$ aws eks create-addon --cluster-name demo --addon-name adot \
--service-account-role-arn arn:aws:iam::123456789012:role/ADOT-Role
Common Mistakes
| Mistake | Impact |
|---|---|
| Not instrumenting all services | Gaps in trace data |
| Tracing 100% of requests | High cost and storage |
| Not correlating traces with logs | Can’t debug effectively |
What’s Next?
Get notified: Alerting.