Seashells and tree annual rings are nature’s meticulous logs. Image by Friedrich Frühling from Pixabay

Microservices

Python Microservices: Effective Canonical Logging Across Services

Distilled lessons from building microservices powering Slang Labs platform. Presented in a PyCon India 2019 tutorial.

Published in
10 min readMar 18, 2020

--

Nature is a meticulous logger, and its logs are beautiful. Calcium carbonate layers in a seashell are nature’s log of ocean temperature, water quality, and food supply. Annual rings in tree cambium are nature’s log of dry and rainy seasons and forest fires. Fossils in the layers in sedimentary rocks are nature’s log of the flora and fauna life that existed at the time.

In software projects, logs, like tests, are often afterthoughts. But at Slang Labs, we take inspiration from nature’s elegance and meticulousness.

We are building a platform for programmers to make interaction with their mobile and web apps more natural by adding Voice Augmented eXperiences (VAX). The platform is powered by a collection of microservices. Each log entry a microservice emits is a fossil record of a request. Logs are designed for timely and effective use in raising alerts and swift diagnosis of issues.

This blog post captures the essence of our logging tactics:

  • Requirements: what we needed from logging, and why.

--

--

Cofounder @SlangLabs. Ex Amazon, Microsoft Research. I learn, do, and write about Machine Learning in production. https://www.ML4Devs.com