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.

Israel Blancas

March 04, 2022
Tweet

More Decks by Israel Blancas

Other Decks in Programming

Transcript

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

    the code until find what is wrong
  2. 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
  3. Service meshs Introduction Service 1 Service 2 Service 3 Sidecar

    proxy Sidecar proxy Sidecar proxy Control plane
  4. 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
  5. Observability Some technology examples Prometheus, Thanos Jaeger Elastic, Fluentd, Kibana

    Log Management Metrics and alerts Tracing Kiali, Grafana, OpenShift UI Management Dashboards
  6. Distributed tracing Tells the story of a request across services

    Which services were touched, when, in which order, what parameters were used… D Tracing
  7. 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
  8. 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); }
  9. 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); } }