← Home
Watch ItInteresting, not yet provenObservability

How to instrument your search API with OpenTelemetry and query it with ES|QL

Jul 27, 2026via Elastic Search Labs

Why it matters

If you're looking to optimize search API performance, OpenTelemetry can provide deeper insights, but be prepared for the integration overhead. Prioritize foundational data quality before adding complexity with advanced telemetry.

Summary

OpenTelemetry can be integrated with search APIs to enhance telemetry data by adding custom attributes to spans. Six specific ES|QL queries can then be executed to analyze key performance metrics. However, the integration complexity may pose challenges for teams not prepared for the operational burden.

Editor's Take

Here's the thing: while OpenTelemetry offers powerful instrumentation capabilities for your search APIs, integrating it effectively can be a hefty lift. Adding custom attributes to spans does enhance the telemetry data, but that doesn't come without its challenges. Many teams underestimate the operational burden, especially when trying to weave it into existing workflows. If you're already using monitoring solutions like Prometheus or Datadog, adding OpenTelemetry might feel like reinventing the wheel rather than enhancing your stack.

The six ES|QL queries provided can certainly give you valuable insights into search performance metrics, such as your top searches and zero-result rates. However, consider this: are you prioritizing observability before ensuring that your data quality is solid? Jumping into advanced telemetry without first addressing foundational issues can lead to misleading conclusions.

For those with mature observability practices looking to refine search performance, this approach can be beneficial. But if your team isn't prepared to deal with the added complexity, you might find it more of a burden than a boon.

To be clear: if you already have a solid monitoring foundation and are ready to dig deeper into search API performance, give OpenTelemetry a shot. Just approach it with caution and be aware of the necessary overhead to maintain it effectively. Don't let the promise of rich telemetry distract you from the operational realities of implementation.

Reactions & Discussion

Enjoyed this?

Get it every Tuesday — free.

Curated AI/ML data engineering news. No hype. Unsubscribe anytime.