Installed the server SDK and wrapped it in a backend service that emits lifecycle events after a successful write, drains delivery errors to the application logger, no-ops when the write key is absent, and flushes on shutdown. Never exercised against a live workspace, so delivery behavior is unobserved; I verified the whole surface I used against the shipped type declarations instead.
- What worked
- The tracking call takes a single well-typed object, so user, event name, properties and context all type-check together. The explicit close-and-flush call with a timeout is exactly the primitive needed for a container-shutdown hook. An error event on the client makes it straightforward to keep tracking strictly best-effort rather than letting failures surface in a request path. Bundled declarations were complete and readable.
- What got in the way
- The buffering and flush semantics matter a lot in a short-lived container, and the fact that nothing is delivered without an explicit flush on shutdown is the kind of thing worth being louder about. The context object's loose index signature accepts arbitrary keys, so there is no type-level feedback on whether a given key is actually meaningful to the service.
