1 | import type { TransactionContext } from '@sentry/types';
|
2 | import type { Hub } from '../hub';
|
3 | import type { Span } from './span';
|
4 | import { SpanRecorder } from './span';
|
5 | import { Transaction } from './transaction';
|
6 | export declare const TRACING_DEFAULTS: {
|
7 | idleTimeout: number;
|
8 | finalTimeout: number;
|
9 | heartbeatInterval: number;
|
10 | };
|
11 |
|
12 |
|
13 |
|
14 | export declare class IdleTransactionSpanRecorder extends SpanRecorder {
|
15 | private readonly _pushActivity;
|
16 | private readonly _popActivity;
|
17 | transactionSpanId: string;
|
18 | constructor(_pushActivity: (id: string) => void, _popActivity: (id: string) => void, transactionSpanId: string, maxlen?: number);
|
19 | /**
|
20 | * @inheritDoc
|
21 | */
|
22 | add(span: Span): void;
|
23 | }
|
24 | export type BeforeFinishCallback = (transactionSpan: IdleTransaction, endTimestamp: number) => void;
|
25 | /**
|
26 | * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.
|
27 | * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will
|
28 | * put itself on the scope on creation.
|
29 | */
|
30 | export declare class IdleTransaction extends Transaction {
|
31 | private readonly _idleHub;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | private readonly _idleTimeout;
|
37 | |
38 |
|
39 |
|
40 | private readonly _finalTimeout;
|
41 | private readonly _heartbeatInterval;
|
42 | private readonly _onScope;
|
43 | activities: Record<string, boolean>;
|
44 | private _prevHeartbeatString;
|
45 | private _heartbeatCounter;
|
46 | private _finished;
|
47 | private _idleTimeoutCanceledPermanently;
|
48 | private readonly _beforeFinishCallbacks;
|
49 | |
50 |
|
51 |
|
52 | private _idleTimeoutID;
|
53 | private _finishReason;
|
54 | constructor(transactionContext: TransactionContext, _idleHub: Hub,
|
55 | |
56 |
|
57 |
|
58 |
|
59 | _idleTimeout?: number,
|
60 | |
61 |
|
62 |
|
63 | _finalTimeout?: number, _heartbeatInterval?: number, _onScope?: boolean);
|
64 | /** {@inheritDoc} */
|
65 | finish(endTimestamp?: number): string | undefined;
|
66 | |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | registerBeforeFinishCallback(callback: BeforeFinishCallback): void;
|
74 | |
75 |
|
76 |
|
77 | initSpanRecorder(maxlen?: number): void;
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | cancelIdleTimeout(endTimestamp?: Parameters<IdleTransaction['finish']>[0], { restartOnChildSpanChange, }?: {
|
85 | restartOnChildSpanChange?: boolean;
|
86 | }): void;
|
87 | |
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | setFinishReason(reason: string): void;
|
97 | |
98 |
|
99 |
|
100 | private _restartIdleTimeout;
|
101 | |
102 |
|
103 |
|
104 |
|
105 | private _pushActivity;
|
106 | |
107 |
|
108 |
|
109 |
|
110 | private _popActivity;
|
111 | |
112 |
|
113 |
|
114 |
|
115 | private _beat;
|
116 | |
117 |
|
118 |
|
119 | private _pingHeartbeat;
|
120 | }
|
121 |
|
\ | No newline at end of file |