Debugging mobile applications in production is a non-trivial task. When you have a microservice architecture, the problem is magnified. When choosing tools for mobile debugging in production, developers have two key requirements:
Most developers are settled on ELK, Sentry, and Jaeger. The ELK stack is megapopular. The majority of developers had at least heard something about Sentry. Jaeger is little known.
I hope that my review will be helpful for companies that are looking for low-cost mobile debugging tools for their productions.
Mobile developers use Sentry as their primary bug-tracking tool with alerts to corporate chat. Sentry features:
What makes it convenient is that developers can send a task to Jira directly from Sentry. When it's done, Jira marks the bug as solved, and if it happens again, Sentry tracks it again.
Many developers use ELK for monolith software. This is where they keep track of application and balancer (nginx) logs. There they also write MySQL slow query logs. ELK includes:
Kibana often helps developers understand what caused the error or is working incorrectly because it contains logs of a business nature: a customer made an appointment, a dealer renewed a subscription, an auction was completed, etc. Here developers also write all the stdout, and in case of an application crashes, they can always see the reasons.
Many developers started to use Jeager when working on microservices. It's an open-source distributed tracking system written in Go. Jaeger data is compatible with the OpenTracing specification, which defines what collected traces will look like. There are out-of-the-box integration SDKs in various languages for quick input.
A trace unit (span in OpenTracing terminology) represents an action: a file read, a logical operation, a request to a service, or a database. A span has a name, a start time, and a duration and may contain tags and logs.
Jaeger consists of several components:
Jaeger client. These are libraries written in various programming languages that are responsible for creating spans.
Jaeger Agent. This network daemon listens to the spans received from the Jaeger client over UDP. It collects them in batches and then sends them to the Collector.
Jaeger Collector. It receives traces from the Jaeger Agent and performs checks and conversions. It then sends them to storage.
Storage. Jaeger supports various repositories that hold spans and traces for later retrieval. Supported storages are In-Memory, Cassandra, and Elasticsearch.
Jaeger Query. It is responsible for retrieving traces from the Jaeger repository server side and making them available to the Jaeger UI.
Jaeger UI. It is an application written in React. It allows developers to visualize traces and analyze them, which is helpful for debugging system problems. It filters traces by service, operation type, tags, time range, and duration.
Jaeger features:
It is important to add an appropriate error tag when an error occurs. Then Jaeger UI will correctly highlight the span with it. Also, developers can add some critical information to tags, for example, user ID, for further filtering. And in the span log, write auxiliary information, for example, error text.
The disadvantage of Jaeger is that developers need to modify application code by adding spans when required.
I also recommend you reading: