# Uncorking Queueing Bottlenecks with OpenTelemetry

How Gearset engineers replaced guesswork with distributed tracing to optimize asynchronous system reliability.

- **Source:** [InfoQ](https://brifing.si/source/68ac18af-a4f3-4f7c-9c2c-44d4af8f89dd)
- **Published:** 2026-11-11
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://www.infoq.com/presentations/opentelemetry-queue-observability/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global>
- **On Brifing:** https://brifing.si/s/2d135c42-7af0-42a9-9ca0-eba90f58b23b

## The Observability Challenge

Gearset engineers faced a recurring problem where customer backup jobs experienced unexplained delays. Despite having extensive dashboards, metrics, and logs, the team struggled to pinpoint the root cause of these performance spikes. They often relied on guesswork, leaving critical questions about system behavior unanswered and impacting overall product reliability and customer trust.

## Transitioning from Monoliths

The company initially operated a single monolith but eventually split responsibilities to improve scalability. They introduced a separate scheduling service that communicated via HTTP, which created tight dependencies. This architecture struggled with traffic spikes, particularly when many users scheduled heavy tasks simultaneously, leading to potential denial-of-service scenarios on core application components.

## Adopting Queueing Systems

To decouple services and smooth out load spikes, the team implemented message queues. This architectural shift allowed the scheduler to offload tasks without needing immediate responses from consumers. Queues provided a buffer, enabling the system to handle backlogs gracefully even if consumer services were temporarily unavailable, thus increasing overall system resilience.

## Limitations of Standard Metrics

While queues solved load issues, monitoring them proved difficult. Standard metrics like queue size, enqueue rates, and dequeue rates provided a high-level view but lacked granular detail. The team found that as they scaled to dozens of queues across multiple regions, these basic metrics became unwieldy and insufficient for complex debugging.

## The Need for Context

The team realized that metrics offered the forest but not the trees, while logs provided individual trees without the forest. They needed a middle ground to connect events across distributed components. Manual investigation of logs was time-consuming and often failed to provide definitive answers during critical production incidents or performance bottlenecks.

## Introducing Distributed Tracing

To bridge the gap, the team adopted OpenTelemetry, an open-source protocol for observability. Distributed tracing allows engineers to track requests as they traverse multiple services. By assigning a hierarchy to events, traces reveal the cause-and-effect relationship between different system components, making it easier to identify exactly where a request is delayed.

## Understanding Trace Structure

A trace consists of a root span representing the entry point, followed by child spans for database requests or function calls. Each span includes a trace ID, a span ID, and a parent ID to maintain hierarchy. This structure allows developers to visualize the full sequence of events and measure duration accurately.

## Beyond Standard Logs

Unlike structured logs, which are often isolated, traces connect events across the entire distributed system. By attaching arbitrary attributes to spans, engineers can query and filter events based on specific business logic. This capability transforms raw data into actionable insights, helping teams understand how customers actually experience the system's performance.

## Measuring Queue Health

The team improved their monitoring by creating custom metrics to track how long messages remained on the queue. By calculating the duration between message arrival and processing, they gained a clearer view of workload delays. This helped them differentiate between queues that were healthy and those requiring immediate engineering intervention.

## Empowering Engineering Teams

Implementing OpenTelemetry is not just a technical upgrade but a cultural shift. By providing tools that offer clear visibility, team leads can empower developers to debug issues confidently. This approach reduces the time spent chasing phantom spikes and fosters a culture of high performance, reliability, and proactive system maintenance.

## Practical Debugging Strategies

Effective observability requires more than just installing tools; it demands a strategic approach to measuring queue health. The team emphasizes the importance of user-centric Service Level Objectives (SLOs) based on latency distributions. These strategies help teams move from reactive firefighting to a more predictable and reliable production environment for users.

## Building Reliable Systems

Ultimately, the transition to distributed tracing allows teams to move past the limitations of traditional monitoring. By understanding the performance characteristics of asynchronous workflows, organizations can build more dependable software. This shift ensures that when issues arise, engineers have the precise data needed to resolve them quickly and effectively.

## Sources covering this story

- https://www.infoq.com/presentations/opentelemetry-queue-observability/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
