AlgoViz

Inside a logging service

medium 30 min

A logging service carries the log lines of all programs to one place where people can search them.

Where it shows up

The same pattern appears across everyday software.

  • ELK for a web shop

    Filebeat on each machine, Kafka in the middle, Logstash for parsing, Elasticsearch and Kibana for search. One index per day, dropped after 30 days.

  • Loki beside Prometheus

    A team that already uses Grafana keeps its lines in Loki. Labels are service and environment only. The search by text runs inside one service and one hour.

  • Containers write to standard output

    The program prints JSON. The platform stores it in a file and an agent on the host ships it. The program knows nothing about the logging service.

  • The debug flag

    Somebody turned on debug in production and volume grew twentyfold. A limit per service dropped the surplus, so only that service lost lines.

  • The password in the line

    A form was logged as a whole. It had to be removed from index, archive and queue. Since then fields are named one by one.

  • Why did my order fail?

    The error page shows a request id. Support types it and sees lines of five services in order, with the failed call to the bank in the third.