This document discusses concepts related to observability including Prometheus, ELK stack, OpenTracing, and Victoria Metrics. It provides examples of setting up Prometheus and Grafana to monitor metrics from applications instrumented with exporters. It also demonstrates setting up Filebeat, Logstash and Elasticsearch (ELK stack) to monitor logs and send them to Elasticsearch. Additionally, it shows how to implement OpenTracing in a Java application and visualize traces using Jaeger. Finally, it outlines an exercise to build a microservices ecommerce application incorporating logging, metrics and tracing using the discussed tools.
51. ELK: Java Application ~ Sending Logs ~ Running Logstash
You can see there is a new ES log - proof that it works. You can create a index on Kibana now.
59. Observability
❏ Long Term Remote Storage for Prometheus
❏ Support prometheus query API
❏ Support for Grafana
❏ Outperform InfluxDB and TimescaleDB by 20x more performance on inserts / selects
❏ Uses 10x less ran than influxDB
❏ High Data Compression - 70x more compression than TimescaleDB
❏ Easy Operation (Easy backup to S3) Ingestion via: Prometheus, InfluxDB, Graphite APIs
❏ OSS Cluster
79. Exercises
Constraints
1. You can use Java, Scala or Clojure as Language
2. You can use SpringBoot2x, Jetty or Netty as Server
3. You need to use Logback | ELK | Jaeger
Let's build a simple ecommerce
1. Build 2 microservices, first microservice will store items and do stock control. The microservice need to
have 3 operations /add/$item where you should have a name, description, photoURL and units at stock
. Second endpoint need be able to retrieve an item by ID, last endpoint need to be able to update itens
on the stock /stock/$ID (increase or decrease items). Second service need provide SALEs so the sales
microservices will call items/stock microservices in order toto sales.
2. Add All logs in ELK
3. Add traces in Jaeger
4. Prodive custom metrics and add them in ELK create a dashboard showing: TOP sales, items that less
less, salesman who sells more, items with less units on stock.