{"version":"2.1.224","anchor":"analytics-shutdown-waits-for-queued-work-before-closing-sink","canonical_anchor":"analytics-shutdown-waits-for-queued-work-before-closing-sink","heading":"Analytics shutdown waits for queued work before closing sinks","tier":"internal","area":"Telemetry","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224\/e\/analytics-shutdown-waits-for-queued-work-before-closing-sink","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224","markdown":"### Analytics shutdown waits for queued work before closing sinks\n\nAnalytics now drain queued events before shutting down, so crash-path events have a chance to send.\n\n**What**\n\nShutdown now drains a queue of pending analytics tasks, raced against a 200 ms timeout, before the event logging, Datadog and error-tracking sinks are closed. The first user of this is the MCP tripwire event, so an event fired on a crash path now has a chance to be sent instead of being dropped at exit.\n\n**Evidence**\n\n`registerPreFlushTask`\n\n- Area: Telemetry\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}