Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How are my microservices doing?

How are my microservices doing?

A talk about the basics of observability. Why it is needed? Why it is important? What are distributed tracing, logging and metrics? We talk about Prometheus, Jaeger, OpenTelemetry, Grafana, Kibana, ElasticSearh, Docker, OpenShift and more tools in the observability context.

C96b8242b26a40f2ee15e138b051779a?s=128

Israel Blancas

March 04, 2022
Tweet

More Decks by Israel Blancas

Other Decks in Programming

Transcript

  1. +Israel Blancas @iblancasa How are my microservices doing?

  2. Israel Blancas @iblancasa isra.rocks Quality Engineer at Red Hat Google

    Developer Group organizer
  3. Before starting

  4. Before starting

  5. • Microservices Who knows about...

  6. • Microservices • Containers (Docker) Who knows about...

  7. • Microservices • Containers (Docker) • Container orchestration (Kubernetes) Who

    knows about...
  8. Observability?

  9. Observability? Application

  10. Observability? Application

  11. Observability? Application

  12. What do we usually do? Check the stacktrace and read

    the code until find what is wrong
  13. Observability? Application Metrics Logs Traces

  14. Why is “observability” something interesting? A quick introduction

  15. Scaling up the infra Introduction

  16. Hypervisor OS OS Scaling up the infra OS Introduction

  17. Scaling up the infra Introduction

  18. Hypervisor OS OS Scaling up the infra Hypervisor OS OS

    Introduction
  19. Scaling up the infra Cattle (containers) • Has a number

    • One is much like any other • Run as a group • If it gets ill, you sacrifice it Pet (VM) • Has a name • Is unique or rare • Personal attention • If it gets ill, you make it better Introduction
  20. Application Microservices Service 1 Service 2 Service 3 Service 4

    Introduction
  21. Service meshs Introduction Service 1 Service 2 Service 3 Sidecar

    proxy Sidecar proxy Sidecar proxy Control plane
  22. To know more! Scalable Microservices with Kubernetes https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 Phippy and

    friends https://www.cncf.io/phippy/ Introduction
  23. Why do we need this? Introduction

  24. Why do we need this? Introduction It all about the

    money!
  25. Why do we need this? Introduction It all about the

    money!
  26. It all about the money Disaster can not be avoided

    • Untested code paths • Corner cases • Outages • Human error • Network issues: latency, bandwidth, reliability, homogeneity… Introduction
  27. Ok so… observability

  28. Application Metrics Logs Traces Observability

  29. Observability Observability and monitoring Alerting Overview (dashboards) Profiling, debugging, tracing,

    logging, dependency analyses... Monitoring Observability
  30. Failures appear • What? • When? • Why? Distributed systems

    as context Observability
  31. Observability Some technology examples Prometheus, Thanos Jaeger Elastic, Fluentd, Kibana

    Log Management Metrics and alerts Tracing Kiali, Grafana, OpenShift UI Management Dashboards
  32. Logging

  33. Solutions to manage and analyze big amounts of logs from

    different systems Logging
  34. Metrics

  35. D Metrics

  36. Distributed tracing

  37. Distributed tracing Tells the story of a request across services

    Which services were touched, when, in which order, what parameters were used… D Tracing
  38. Spans Units of work created via instrumentation Each one includes

    information about when it started, how long it took… and can contain references to other spans D Tracing
  39. Spans D Tracing

  40. Spans D Tracing

  41. Spans D Tracing @GET @Produces(MediaType.TEXT_PLAIN) public String submit() { Account

    account = accountsService .getAccount(); Order order = new Order(UUID.randomUUID().toString(), account); inventoryService .processOrder(order); return String.format("Order submitted: %s" , order); }
  42. Spans D Tracing @GET @Produces(MediaType.TEXT_PLAIN) public String submit() { try

    (Scope scope = tracer.buildSpan("submitOrder").startActive(true)) { Account account = accountsService .getAccount(); Order order = new Order(UUID.randomUUID().toString(), account); inventoryService .processOrder(order); return String.format("Order submitted: %s" , order); } }
  43. Jaeger D Tracing

  44. dev.to/iblancasa

  45. Thank you! Questions? +Israel Blancas @iblancasa