Reading a GZipped File from S3 to Memory in NodeJS
Specifically, I had firehose landing some small-ish files in S3 that were gzipped. Each file has a JSON object per row and I need to get the contents of that file into a lambda for processing. SO...
View ArticleBeware Blocking Channel Sends in Go
I recently got bit by a blocking channel send in Go causing an entire program to hang. I had gorouting thing running on a timer to check something periodically and send results to a channel. Another...
View ArticleConditionally Applying Middlware in Go
I've been prototyping some stuff with Huma, and, while it lets your bring your own router, that doesn't mean that all features of the router are available to you. My problem was that I wanted API...
View ArticleRunning Database Integration Tests in Go
I'm working through writing a Go app backed by a PostgreSQL database (using sqlx). Whenever I'm writing code that interacts with a database, I want to make sure that I'm testing against the real thing...
View ArticleUsing DataDog Sampling Rules to Exclude Traces
There are some docs on this, but it took way to much trial and error on my part to figure it out, so hopefully this helps some future person (or future me!). The gist of this is there are two ways to...
View ArticleDependency Inversion in Go HTTP Handlers
This post has a lot of Go, but I suspect its relevant to any programming language with first class functions. I've been doing some more work in Go the last month or so. One bit of advice I really like...
View ArticleDependency Inversion with Client Side Interfaces in Go
One interesting thing about Go is that it lacks and explicit implements keyword for interfaces. If you want to implement an interface, there's no extra step. As long as function signatures match the...
View ArticleTest Setup and Teardown Methods in Go
How to mimic XUnit-style setUp and tearDown methods in Go.… Continue reading Test Setup and Teardown Methods in Go →
View ArticleHow to Send AWS EventBridge Events to CloudWatch Logs
Ostensibly this is easy. Set an event rule target to a log group and it Just Works (tm). I suspect that's probably the case in the AWS UI, but with infra as code there's a missing piece: cloudwatch...
View ArticleA (Small) Observability 2.0 Success Story
At PMG, we've spent the last few months instrumenting our applications with OpenTelemetry and integrating with a tracing vendor. Part of this, for me, was reading the Observability Engineering book,...
View Article