Member-only story

Productionizing Observable Notebooks with 3rd party Active Monitoring

Tom Larkworthy
4 min readNov 14, 2021

--

I keep my 200+ public notebooks on the observablehq.com platform running by actively monitoring them with a 3rd party monitoring tool uptimerobot. Here is how I got it connected, and how I did it unobtrusively without altering the original notebooks.

Broken notebooks are a big problem. I have encountered many broken notebooks on observablehq.com, and then much later, I have written many more. The thing is, I did not know my old notebooks were broken until I randomly checked! I don’t want to host broken notebooks, but I can’t be checking 200 notebooks every week, it doesn’t scale! Instead, I figured out a way to bring off-the-shelf monitoring solutions to the notebook ecosystem. The best thing is that it can be applied to any notebook. There is no special library or anything to depend upon etc.

Using the Observablehq runtime to create a Healthcheck Metabook

Did you know that all notebooks are packed as ES6 modules, and you can run them inside the open-source Observablehq runtime programmatically? (see Advanced Embedding and Downloading) This means a notebook can find and run code found in another notebook. I call these types of notebooks metabooks as they are higher-order notebooks (notebooks whose input is another notebook).

So, the healthcheck metabook, given a target notebook, runs the target on an internal Observablehq runtime and looks for errors.

--

--

Tom Larkworthy
Tom Larkworthy

Written by Tom Larkworthy

Observablehq/Cloud consultant. Developing webcode.run to serverless to Observablehq. Ex-Firebase, Ex-Google Cloud.

No responses yet

Write a response