Use GOTOOLCHAIN to run older versions of the Go toolchain

I've been working through Mastering Distributed Tracing to learn more about (you guessed it) tracing. The book is from 2019, and while I've been assured that its contents are still sufficiently up-to-date, the Go-based code examples are a bit dated; namely, they use dep for dependency management, rather than the new(er) built-in module system. dep seems like a fine tool that had its time, but seeing as I'm used to Go modules, and I don't really want to learn an obsolete tool just for some book exercises, I created a Go module for the exercises and started converting the Gopkg.toml/Gopkg.lock files by hand.

Read More...
Posted on 2025-02-16

Beware staleness when creating recursive recording rules in Prometheus

At work, we have a Prometheus metric from our build system named autobuild_build_timestamp that exports the timestamp for the latest build for a given application and Git branch. The process that exports this is stateless, so if it restarts or a new version of it is deployed, we're out of luck if we want to do something like build a dashboard to show the latest builds. One thing we can do is use a range query, but we can also make use of Prometheus' recording rules to provide a nice abstraction to users who care about this data, and to forgo a bunch of redundant recalculations of the same data.

Read More...
Posted on 2024-10-30

Why is my Lambda function getting retried when getting synchronously called from the command line?

I recently ran into a surprising behavior when calling a Lambda function from the command line that I thought I'd share.

Read More...
Posted on 2024-09-13

Tips and Tricks Picked Up From Using a Large Language Model to Search My Personal Wiki By "Vibe"

Recently, I wanted to find a document in my personal wiki that mentioned the idea of "there will always be another coding task" - unfortunately, traditional search came up short here, because I couldn't remember the exact wording I used, only the "vibe" of this particular phrase. However, I've been looking for a reason to use a large language model (aka LLM) with my wiki, and while there are other techniques that could accomplish the same goal, this seemed like as good an excuse as any to try it out! I learned some tips and tricks along the way, so I thought I'd share - if you just want the tips, feel free to skip ahead to the Summary - otherwise, read on!

Read More...
Posted on 2024-09-06

Thinking about Clever Code

The trick I covered in my previous post got me reflecting on "clever" code. Most developers I know (myself included) have learned to mistrust clever code - we see it and the intuition we've developed provokes a gut reaction of "oh no, how can this blow up in my face?"

Read More...
Posted on 2024-08-09