chapter nine

9 Observability

 

This chapter covers

  • Understanding the concepts of Observability like Traces, Metrics, and Logs
  • Adding OpenTelemetry instrumentation libraries to ship metrics to a metrics collector
  • Setting up a performance monitoring dashboard for the Microservices to see the metrics by using Jaeger and Prometheus
  • Installing an observability stack including Jaeger, Prometheus, Fluent Bit, Elasticsearch, Kibana

Due to the nature of Microservice Architecture, you may end up with many services for different reasons to meet product needs. Having good visibility of this system becomes very important to spot a problem proactively and take action to fix it in a short period of time. Services talk to other services, databases, queues, and 3rd party services, producing insights about their internal operations. In this chapter, we learn how to collect those insights and generate meaningful reports to understand the current situation of a cloud-native Microservices environment.

9.1 Observability

9.1.1 Traces

9.1.2 Metrics

9.1.3 Logs

9.2 OpenTelemetry

9.2.1 Instrumentation Locations

9.2.2 Instrumentation

9.2.3 Metric Backend

9.2.4 Service Performance Monitoring

9.3 Observability in Kubernetes

9.3.1 Jaeger All in One

9.3.2 OpenTelemetry Collector

9.3.3 Prometheus

9.3.4 Jaeger Installation

9.3.5 OpenTelemetry Interceptor for Order Service

9.3.6 Understanding the Metrics of Order Service

9.3.7 Application Logging

9.3.8 Logs Collection

9.3.9 Elasticsearch as Logging Backend

9.3.10 Kibana as Logging Dashboard

9.4 Summary