class SessionFlusher
implements SessionFlusherLike
import { SessionFlusher } from "https://deno.land/x/sentry_deno@v0.2.2/packages/hub/src/sessionflusher.ts";
Constructors
new
SessionFlusher(client: Client, attrs: ReleaseHealthAttributes)Properties
private
_client: Clientprivate
_pendingAggregates: Record<number, AggregationCounts>Methods
private
_incrementSessionStatusCount(status: RequestSessionStatus, date: Date): numberIncrements status bucket in pendingAggregates buffer (internal state) corresponding to status of the session received
flush(): void
Checks if pendingAggregates
has entries, and if it does flushes them by calling sendSession
incrementSessionStatusCount(): void
Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
fetches the session status of the request from Scope.getRequestSession().status
on the scope and passes them to
_incrementSessionStatusCount
along with the start date