diff --git a/docs/platforms/javascript/common/apis.mdx b/docs/platforms/javascript/common/apis.mdx index c14e814d84c7e..35b362916fe44 100644 --- a/docs/platforms/javascript/common/apis.mdx +++ b/docs/platforms/javascript/common/apis.mdx @@ -86,8 +86,13 @@ Sentry.setTag("tag", "value"); }, ]} > - Flushes all pending events and disables the SDK. Note that this does not - remove any listeners the SDK may have set up. +Flushes all pending events and disables the SDK. Note that this does not +remove any listeners the SDK may have set up. After a call to `close`, the current client cannot be used anymore. It's +important to only call `close` immediately before shutting down the application. + +Alternatively, the [`flush`](#flush) method drains the event queue while keeping the +client enabled for continued use. + diff --git a/redirects.js b/redirects.js index 0692528231b04..47c501e1e99be 100644 --- a/redirects.js +++ b/redirects.js @@ -498,6 +498,14 @@ const userDocsRedirects = [ source: '/platforms/javascript/guides/:guide/configuration/environments/', destination: '/platforms/javascript/guides/:guide/configuration/options/#environment', }, + { + source: '/platforms/javascript/configuration/draining/', + destination: '/platforms/javascript/apis/#flush', + }, + { + source: '/platforms/javascript/guides/:guide/configuration/draining/', + destination: '/platforms/javascript/guides/:guide/apis/#flush', + }, { source: '/platforms/:platform/context/', destination: '/platforms/:platform/enriching-events/context/',