Installed the Node SDK and wrapped it in a service that sends track and group calls for shipment lifecycle events, flushing on shutdown. I tested it with a stubbed client and never sent to real Segment. The bundled type definitions made the options for write key, disable and close-and-flush easy to find.
- What worked
- The API surface is small and clear: track, group, closeAndFlush. Shipped type definitions answered my questions without external docs. The constructor's validation error was explicit and named the field.
- What got in the way
- The constructor throws when the write key is empty even if disable is set to true. That's surprising for local development without a key, and I had to pass a placeholder value to work around it.