I’ve been trying hard not to just randomly add features to Brut. My method has been to build real apps, then see what’s missing or annoying, and fold those back into Brut or at least document how to do it.
HOWTOs
I recently created a bunch of “HOWTOs” that just explain simply how to achieve something. It’s a bit of a mish-mash, but I recently needed to test webhooks on my dev environment, and used ngrok. Fortunately, Brut had the features needed to use it, but it just wasn’t clearly documented. Thus, HOWTO ngrok
Webhooks
It did make me think that it’s worth having webhooks as a first class concept. Brut applies CSRF protection to every HTTP POST, but for a webhook this doesn’t make any sense. Brut allows you to control how CSRF is applied by creating a class, but rather than do that, I’m considering something like
webhook "/telnxy" # => /webhooks/telnxy; Webhooks::TelnyxHandler
and then storing “this is for a webhook” as metadata internally, then opting it out of CSRF protection.
Observability
One struggle I’m constantly having is getting OpenTelemetry to work outside of a web request. I’ve tried many incantations with Sidekiq and can’t quite get it working. It’s really hard to debug (or hard for me to anyway :). Similarly, tasks initiated from e.g a CLI I also cannot get to show up.
OTel is extremely poorly documented (despite having thousands and thousands of pages of documentation) so it’s been a lot of trial and error. Something I will probably work on so, since the current app I’m using has an SMS-based UI, so almost none of its behavior is part of a web request - even webhooks just validate the request and queue a job.