The Simplest Way to Make Elastic Observability and Linkerd Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use elastic observability and linkerd to track service mesh traffic and store cluster metrics. Linkerd records network calls between pods while Elastic collects and searches those logs. This setup helps teams spot slow requests and failed calls right away. When a pod drops traffic, you see the exact route and status code. You do not need to change your app code to get this data. How data flows between elastic observability and linkerd Linkerd runs a tiny sidecar next to each container

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use elastic observability and linkerd to track service mesh traffic and store cluster metrics. Linkerd records network calls between pods while Elastic collects and searches those logs.

This setup helps teams spot slow requests and failed calls right away. When a pod drops traffic, you see the exact route and status code. You do not need to change your app code to get this data.

How data flows between elastic observability and linkerd

Linkerd runs a tiny sidecar next to each container in your cluster. That sidecar watches every call going in and out of the pod. It tracks request timing, success rates, and mutual TLS status for every route.

A log collector reads those metrics from the mesh on each node. The collector then sends that data to your Elastic cluster over HTTPS. It logs in to Elastic with an API key or a service token.

You should give that collector a write-only role in Elastic. The collector only needs to add new log events to specific indices. It should never have permission to read old logs or delete cluster data.

Inside the cluster, Linkerd uses Kubernetes service accounts to verify each pod. It checks the pod identity and issues short TLS certs to encrypt traffic. This keeps internal calls safe before metrics ever leave the node.

Common failure modes and how to scope roles

Many teams make the mistake of using one shared admin key for collectors. If an attacker steals that key, they can read or wipe all logs. Create a separate key for each cluster and limit its index permissions.

Another common bug happens when the mesh blocks the log collector itself. If the collector cannot reach the Linkerd metric ports, your charts go blank. You must set network rules so the collector can scrape local sidecar ports.

AI Observability + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged queries in Elastic also create blind spots during an audit. When engineers debug mesh errors, they often run broad searches across raw logs. Those logs might hold user emails, phone numbers, or card numbers from headers.

Give your engineers read roles that only cover the indices they own. Set up data masking so searches rewrite emails and card numbers in results. Turn on audit logs in Elastic so you know who ran which search.

Keeping mesh metrics clean at scale

High traffic meshes create a lot of log lines every second. If you send every single debug log to Elastic, your storage fills up. You also slow down search queries when an outage hits your apps.

Configure your collector to drop noisy health check logs before sending data. Keep the core latency numbers, error counts, and TLS status fields. This keeps your index size small and your dashboards fast.

Rotate your Elastic API keys on a set schedule to limit risk. Check your Kubernetes role bindings often to remove dead collector accounts. Simple rules keep your mesh data safe and easy to search.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

How does Linkerd send metrics to Elastic?

Linkerd exposes metrics on each pod, and an agent scrapes them. That agent then formats the data and sends it to Elastic over HTTPS.

What permissions does the log collector need in Elastic?

Give the collector an API key with write-only permissions for your mesh index. Do not give it read access or cluster admin rights.

Does Linkerd encrypt traffic going to Elastic?

Linkerd encrypts traffic between pods inside your cluster using mutual TLS. For external Elastic clusters, configure your log shipper to use standard TLS.

The query runs. The emails stay hidden.