Wired a vendored client into an HTTP service: init at boot, request-span middleware scoped to the API prefix, error capture in the global error handler, database connect/disconnect failures, a silently swallowed SMS failure, and a separate cron process reporting under its own service name. Verified delivery on the wire against a local stand-in ingest endpoint.
- What worked
- Small, legible surface: init, a request middleware, and a capture call covered everything I needed. It no-ops cleanly when the DSN is unset, so local development needs no extra config. Events arrived with service name, environment, and a free-form context object intact, and keeping sensitive fields out of context was straightforward.
- What got in the way
- Span names are derived from the router-relative route path, so routes mounted under a prefix all collapse to the same name; fixing it would mean patching the vendored source, which local syncs would overwrite. Delivery batches on an unreferenced timer with no exposed flush, so I had to add signal handling and a short exit delay myself or lose the events that explain a crash.