Why do I need OpenTelemetry if I’m running on Kubernetes? I’ve got Prometheus for metrics, and log collection already — where’s the value?
I’ve heard this question, or variations on it, pretty frequently over the past months. It’s a good one, but I think it’s the wrong question in some ways. The question really isn’t ‘what do I get from OpenTelemetry’, it’s ‘what am I missing without OpenTelemetry’?
The fact that Kubernetes ships with so many useful metrics (and that there’s such great tools like kube-state-metrics and the rest of the Prometheus ecosystem) can lull developers into a false sense of security. There’s so much data, it’s gotta be useful, right? You’ve already got ways to aggregate logs, so what else is there? What I’ve discovered from talking to teams that are adopting Kubernetes, though, is that just because there’s a high quantity of telemetry, it isn’t necessarily of high quality.
If you’re a developer or SRE, especially one that’s getting started with k8s, then it’s not enough to just start scraping Prometheus endpoints and be on your way. Starting out, you need some highly opinionated defaults that point you towards interesting — and actionable — insights. You need to emit highly contextual telemetry from your application code, that can be correlated with metrics and events occurring in k8s itself. As you scale, then you want to replace those sensible defaults with tailored, context-rich, and dense telemetry that allows your team to understand the interplay between Kubernetes, the underlying nodes, your application code, the network, dependent services, etc.
OpenTelemetry provides a lot of the answers here! By using the OpenTelemetry SDK and Collector, you can create telemetry from your application and have it automatically annotated with accurate, and consistent, metadata. The Collector can gather metrics and events from the API Server, Kubelet, and other crucial components of a cluster. Best of all, this data is all vendor-agnostic — no more reliance on proprietary agents or expensive and confusing billing.