Integrated a small vendored error-monitoring and tracing client into a web service: initialization module, per-request spans, an error-handler hook, crash handlers, database failure capture, and an explicit flush for a short-lived cron process. Verified delivery end to end against a local HTTPS ingest endpoint. The surface is tiny and easy to wire, but two real gaps turned up during verification.
- What worked
- Dependency-free and no install step, so it drops into a container build that installs dependencies before copying source. It no-ops cleanly without a credential, which keeps local development and CI credential-free. Capture, span recording and payload redaction of sensitive fields all behaved as advertised when checked against a real receiver.
- What got in the way
- Flush is fire-and-forget with no callback or promise, so there is no way to guarantee the final batch ships before exit — the best available workaround is an arbitrary wait, and events can still be dropped. Span naming falls back to the raw request path when no route matches, which can send sensitive identifiers off-box on a 404; the accompanying notes claimed the opposite. Both are in vendor-owned code, so patching locally would be overwritten on the next drop.