1 | import type { Client, SessionAggregates, SessionFlusherLike } from '@sentry/types';
|
2 | type ReleaseHealthAttributes = {
|
3 | environment?: string;
|
4 | release: string;
|
5 | };
|
6 |
|
7 |
|
8 |
|
9 | export declare class SessionFlusher implements SessionFlusherLike {
|
10 | readonly flushTimeout: number;
|
11 | private _pendingAggregates;
|
12 | private _sessionAttrs;
|
13 | private _intervalId;
|
14 | private _isEnabled;
|
15 | private _client;
|
16 | constructor(client: Client, attrs: ReleaseHealthAttributes);
|
17 | /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */
|
18 | flush(): void;
|
19 | /** Massages the entries in `pendingAggregates` and returns aggregated sessions */
|
20 | getSessionAggregates(): SessionAggregates;
|
21 | /** JSDoc */
|
22 | close(): void;
|
23 | /**
|
24 | * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
|
25 | * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
|
26 | * `_incrementSessionStatusCount` along with the start date
|
27 | */
|
28 | incrementSessionStatusCount(): void;
|
29 | /**
|
30 | * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
|
31 | * the session received
|
32 | */
|
33 | private _incrementSessionStatusCount;
|
34 | }
|
35 | export {};
|
36 |
|
\ | No newline at end of file |