Alex Tech Topic — Issue #3

Demystifying Diagram as Code & Alerts Thresholds

Alexandre Couëdelo
4 min readNov 14, 2022

--

This time I am sharing some new insight on one of my favourite topics Diagram as Code. The release of Gardener, which I shared in the previous newsletter, is the main reason I wanted to bring this subject up. Gardener is a CLI that turns PlantUML files reference in Markdown image tags into images. I have been waiting for such a tool for a very long time. Over the years, I have also evolved my approach to creating diagrams as code to use as few tools as possible.

AI-generated Abstract art generated by giving the topics as inputs

The second topic, Alert threshold, is related to a recent article I wrote. Writing this article made me realise how clumsy we are with monitoring. I believe we have the wrong approach to the alert threshold. More about it in the dedicated section.

Last, I added a section to reflect on this newsletter’s progress. My personal reflection on starting a newsletter and the direction I want to give to in future issues.

Diagram as Code

What is Diagram as Code?

In a nutshell, a diagram as code is a way of representing diagrams in a text-based format. This approach has a number of advantages over traditional methods, such as being more portable and easier to version control. Additionally, it allows for greater collaboration between teams, as changes can be made and tracked in a central location.

I hated the step of rendering the diagram before committing my *.puml files. I always ended up with a drift between the code and the diagram. Rendering the diagram via CI always involved a lot of scripting, so it was not great. Meet gardener that solves the issue.

A year ago, I wrote “3 Diagrams as code tools that combine cover all your needs”. This article is the most popular on my medium account. However, my process has evolved since last year. I stopped using Diagrams because I figured out how to use PlanUML better to cover the gap. PlantUML is highly extensible, and with a few annotations, you can get all the sprites you need to draw an architecture diagram.

--

--

Alexandre Couëdelo

Software Supply Chain and Automation Specialist (aka. DevOps).