Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/sentry_deno/packages/hub/src/index.ts>closeSession

Unofficial port of the Sentry SDK for JavaScript to Deno.
Latest
function closeSession
import { closeSession } from "https://deno.land/x/sentry_deno@v0.2.2/packages/hub/src/index.ts";

Closes a session by setting its status and updating the session object with it. Internally calls updateSession to update the passed session object.

Note that this function mutates the passed session (@see updateSession for explanation).

Parameters

session: Session

the Session object to be closed

optional
status: Exclude<SessionStatus, "ok">

the SessionStatus with which the session was closed. If you don't pass a status, this function will keep the previously set status, unless it was 'ok' in which case it is changed to 'exited'.