TUBA: Finally, an Error Management Tool for Microservices
Tags: programming, microservices, express, errors
Published: 2024-05-16 17:05:05

Microservice architecture, while powerful and flexible, comes with its own set of immense headaches. This is especially true when it comes to error management. Tracking down errors in a complex web of containerized services can feel like looking for a needle in a haystack. Each microservice may generate its own set of errors, making it difficult to pinpoint root causes, leading to prolonged downtimes and frustrated developers.

Microservices often run on different nodes and environments, producing logs that are scattered and unstructured. Collating these logs for meaningful analysis is a daunting task, often requiring significant manual effort and time.

And furthermore as applications scale and the number of microservices increases, so does the complexity of managing them. Each service can fail in various ways, and these failures often cascade, affecting other services and making the original issue hard to identify.

That is…until Tuba. (Insert war horn sound effect).

## What is Tuba?

We developed [Tuba](https://www.npmjs.com/package/tuba-tracing) to address the complexities of error tracking and analysis in microservice environments, creating an entirely new pipeline (a tuba) for microservice errors. Tuba traces, parses, and stores errors across all services and offers an intuitive interface with comprehensive features designed to streamline error detection, diagnosis, and resolution. It also comes with a suite of custom Prometheus metrics for organizations who utilize the monitoring tool in their tech stack.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzcd4o2d8bxpsrzia5qf.png)

Tuba’s Interface provides users with a centralized platform accessible via an NPM package and a Docker image, eliminating the hassle of complex setup processes. Once deployed, users can navigate Tuba’s rich array of tools seamlessly. From the Dashboard offering a bird’s-eye view of pinned errors to the Timeline, Heatmap, and History, our goal was to empower developers to delve deep into their application’s error landscape with unprecedented ease.

![Tuba’s Timeline tool displaying a cascading error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlrsyji08w1dw87hvz3i.png)

Tuba’s Timeline tool provides nuanced precision, allowing users to visualize cascading errors and their impact across connected services. By pinpointing the root cause of failures, developers can expedite troubleshooting and minimize downtime, ensuring uninterrupted service delivery.

Furthermore, Tuba’s Heatmap provides a dynamic 2D visualization of error distribution among individual services, enabling users to identify recurring bugs and prioritize remediation efforts effectively. Any pinned error can easily be downloaded into CSV format to store and share.

![Tuba’s Heatmap tool displaying errors by service](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr4uct9pobl2u6qh3whv.png)

## How to Contribute

In the initial beta, Tuba scrapes and traces errors exclusively in Node/Express.js. That said- we’re planning to expand the featureset over the upcoming months to also parse errors in Spring Boot, Django, and other backend frameworks. We’re also looking to expand the schema and include user identifiers, allowing errors to be organized by user to display exact cascading timelines on a per-user basis.

## TLDR

Checkout Tuba on [Github](https://github.com/oslabs-beta/Tuba) to try it in your microservice environment- and if you’re interested in contributing or have ideas for the project, feel free to reach out to us below!


**Myles Austin**
[Github](https://github.com/mtv1243) / [LinkedIn](https://www.linkedin.com/in/mylesaustin/)

**Rick Markowitz:**
[Github](https://github.com/rmarkowi1990) / [LinkedIn](https://www.linkedin.com/in/rickmarkowitz/)

**Emi Knox-Hershey**
[Github](https://github.com/emi-kh) / [LinkedIn](https://www.linkedin.com/in/emiknoxhershey/)

**Matthew Allen:**
[Github](https://github.com/Allen726) / [LinkedIn](https://www.linkedin.com/in/matthew-allen-b0611868/)

![Tuba's Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzo6vmscq3sskbio8exc.png)