shutdown() during process exit (or on hot-reload teardown in long-running services) to ensure pending telemetry is flushed and resources are not leaked. After shutdown(), the same SDK instance is no longer usable. Create a new instance if you need to reconnect.
shutdown() also releases the identities this SDK was reachable by (the API key it was built with, and the instance_id that initialize() resolved), so the next construction builds a genuinely fresh SDK rather than handing back this closed one. That is what makes reconnecting, and picking up a rotated API key without restarting the process, work.
It only releases an identity that still points at this SDK, so shutting one down never disconnects a replacement that has already taken its place.In
maximem-synap 0.4.0 and earlier this was not the case: the entry outlived teardown and the next caller was handed the shut-down SDK, with its transports and stream already closed. Fixed in 0.4.1.Parameters
This method takes no parameters.Returns
ReturnsNone.
Example
Raises
No method-specific exceptions; see Error Codes for the general SDK exception hierarchy.See also
- initialize: the matching startup call.
- configure: adjust SDK options before startup.