Node.js: rejoin Fleet when the Logfire SDK configures again after shutdown
Found in review of pydantic/logfire-js#422 (finding 3).
logfireFleet() keeps a module-level logfireStarted flag, so a second configure({ fleet }) re-governs the new SDK under the same client instead of starting another. Its shutdown() stopped the client (AGENT.stop()) but left the flag set. A later configure({ fleet }) then returned from start() before AGENT.start(): the SDK looked managed, with no client running.
shutdown() now clears the flag, so the next logfireFleet() prepares the agent again and start() starts a new client. That is the same path register() takes after its own shutdown, which is already tested in otel.test.ts ("register after its shutdown, in one process").
Python isn't affected: its hook has no shutdown(), the client says goodbye from its exit hook, and start() checks whether the client is live, not a flag.
Test
A new case in node/otel/test/logfire.test.ts: configure(), shutdown(), then configure() again, in a real process against a local OpAMP server. The server must hear a goodbye from each client, meaning the second one ran. It fails without the fix: only one goodbye arrives. The Node suite passes (170 tests).
The CHANGELOG line is under Unreleased › Fixed. It needs an SDK release (0.2.2) to reach logfire-js.
Generated by Claude Code