@sentry/types 8.0.0-alpha.1 → 8.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/package.json +1 -0
- package/package.json +15 -2
- package/types/attachment.d.ts +2 -1
- package/types/attachment.d.ts.map +1 -1
- package/types/client.d.ts +29 -34
- package/types/client.d.ts.map +1 -1
- package/types/envelope.d.ts +3 -3
- package/types/envelope.d.ts.map +1 -1
- package/types/event.d.ts +2 -12
- package/types/event.d.ts.map +1 -1
- package/types/feedback.d.ts +12 -1
- package/types/feedback.d.ts.map +1 -1
- package/types/hub.d.ts +0 -21
- package/types/hub.d.ts.map +1 -1
- package/types/index.d.ts +4 -3
- package/types/index.d.ts.map +1 -1
- package/types/scope.d.ts +14 -3
- package/types/scope.d.ts.map +1 -1
- package/types/span.d.ts +43 -20
- package/types/span.d.ts.map +1 -1
- package/types/spanStatus.d.ts +59 -0
- package/types/spanStatus.d.ts.map +1 -0
- package/types/stacktrace.d.ts +1 -1
- package/types/stacktrace.d.ts.map +1 -1
- package/types/startSpanOptions.d.ts +2 -66
- package/types/startSpanOptions.d.ts.map +1 -1
- package/types/transaction.d.ts +1 -8
- package/types/transaction.d.ts.map +1 -1
- package/types/transport.d.ts +1 -1
- package/types/transport.d.ts.map +1 -1
- package/types/user.d.ts +0 -6
- package/types/user.d.ts.map +1 -1
- package/types-ts3.8/attachment.d.ts +2 -1
- package/types-ts3.8/client.d.ts +29 -34
- package/types-ts3.8/envelope.d.ts +3 -3
- package/types-ts3.8/event.d.ts +2 -12
- package/types-ts3.8/feedback.d.ts +12 -1
- package/types-ts3.8/hub.d.ts +0 -21
- package/types-ts3.8/index.d.ts +4 -3
- package/types-ts3.8/scope.d.ts +14 -3
- package/types-ts3.8/span.d.ts +43 -20
- package/types-ts3.8/spanStatus.d.ts +59 -0
- package/types-ts3.8/stacktrace.d.ts +1 -1
- package/types-ts3.8/startSpanOptions.d.ts +2 -66
- package/types-ts3.8/transaction.d.ts +1 -8
- package/types-ts3.8/transport.d.ts +1 -1
- package/types-ts3.8/user.d.ts +0 -6
package/types/span.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Primitive } from './misc';
|
|
2
2
|
import type { HrTime } from './opentelemetry';
|
|
3
|
+
import type { SpanStatus } from './spanStatus';
|
|
3
4
|
import type { TransactionSource } from './transaction';
|
|
4
5
|
type SpanOriginType = 'manual' | 'auto';
|
|
5
6
|
type SpanOriginCategory = string;
|
|
@@ -33,9 +34,6 @@ export interface SpanJSON {
|
|
|
33
34
|
span_id: string;
|
|
34
35
|
start_timestamp: number;
|
|
35
36
|
status?: string;
|
|
36
|
-
tags?: {
|
|
37
|
-
[key: string]: Primitive;
|
|
38
|
-
};
|
|
39
37
|
timestamp?: number;
|
|
40
38
|
trace_id: string;
|
|
41
39
|
origin?: SpanOrigin;
|
|
@@ -44,6 +42,43 @@ export interface SpanJSON {
|
|
|
44
42
|
type TraceFlagNone = 0;
|
|
45
43
|
type TraceFlagSampled = 1;
|
|
46
44
|
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
|
|
45
|
+
export interface TraceState {
|
|
46
|
+
/**
|
|
47
|
+
* Create a new TraceState which inherits from this TraceState and has the
|
|
48
|
+
* given key set.
|
|
49
|
+
* The new entry will always be added in the front of the list of states.
|
|
50
|
+
*
|
|
51
|
+
* @param key key of the TraceState entry.
|
|
52
|
+
* @param value value of the TraceState entry.
|
|
53
|
+
*/
|
|
54
|
+
set(key: string, value: string): TraceState;
|
|
55
|
+
/**
|
|
56
|
+
* Return a new TraceState which inherits from this TraceState but does not
|
|
57
|
+
* contain the given key.
|
|
58
|
+
*
|
|
59
|
+
* @param key the key for the TraceState entry to be removed.
|
|
60
|
+
*/
|
|
61
|
+
unset(key: string): TraceState;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the value to which the specified key is mapped, or `undefined` if
|
|
64
|
+
* this map contains no mapping for the key.
|
|
65
|
+
*
|
|
66
|
+
* @param key with which the specified value is to be associated.
|
|
67
|
+
* @returns the value to which the specified key is mapped, or `undefined` if
|
|
68
|
+
* this map contains no mapping for the key.
|
|
69
|
+
*/
|
|
70
|
+
get(key: string): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Serializes the TraceState to a `list` as defined below. The `list` is a
|
|
73
|
+
* series of `list-members` separated by commas `,`, and a list-member is a
|
|
74
|
+
* key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
|
|
75
|
+
* surrounding `list-members` are ignored. There can be a maximum of 32
|
|
76
|
+
* `list-members` in a `list`.
|
|
77
|
+
*
|
|
78
|
+
* @returns the serialized string.
|
|
79
|
+
*/
|
|
80
|
+
serialize(): string;
|
|
81
|
+
}
|
|
47
82
|
export interface SpanContextData {
|
|
48
83
|
/**
|
|
49
84
|
* The ID of the trace that this span belongs to. It is worldwide unique
|
|
@@ -61,7 +96,7 @@ export interface SpanContextData {
|
|
|
61
96
|
/**
|
|
62
97
|
* Only true if the SpanContext was propagated from a remote parent.
|
|
63
98
|
*/
|
|
64
|
-
isRemote?: boolean;
|
|
99
|
+
isRemote?: boolean | undefined;
|
|
65
100
|
/**
|
|
66
101
|
* Trace flags to propagate.
|
|
67
102
|
*
|
|
@@ -69,9 +104,10 @@ export interface SpanContextData {
|
|
|
69
104
|
* sampled or not. When set, the least significant bit documents that the
|
|
70
105
|
* caller may have recorded trace data. A caller who does not record trace
|
|
71
106
|
* data out-of-band leaves this flag unset.
|
|
72
|
-
* We allow number here because otel also does, so we can't be stricter than them.
|
|
73
107
|
*/
|
|
74
108
|
traceFlags: TraceFlag | number;
|
|
109
|
+
/** In OpenTelemetry, this can be used to store trace state, which are basically key-value pairs. */
|
|
110
|
+
traceState?: TraceState | undefined;
|
|
75
111
|
}
|
|
76
112
|
/**
|
|
77
113
|
* Interface holding all properties that can be set on a Span on creation.
|
|
@@ -102,13 +138,6 @@ export interface SpanContext {
|
|
|
102
138
|
* Trace ID
|
|
103
139
|
*/
|
|
104
140
|
traceId?: string | undefined;
|
|
105
|
-
/**
|
|
106
|
-
* Tags of the Span.
|
|
107
|
-
* @deprecated Pass `attributes` instead.
|
|
108
|
-
*/
|
|
109
|
-
tags?: {
|
|
110
|
-
[key: string]: Primitive;
|
|
111
|
-
};
|
|
112
141
|
/**
|
|
113
142
|
* Data of the Span.
|
|
114
143
|
* @deprecated Pass `attributes` instead.
|
|
@@ -128,10 +157,6 @@ export interface SpanContext {
|
|
|
128
157
|
* Timestamp in seconds (epoch time) indicating when the span ended.
|
|
129
158
|
*/
|
|
130
159
|
endTimestamp?: number | undefined;
|
|
131
|
-
/**
|
|
132
|
-
* The origin of the span, giving context about what created the span.
|
|
133
|
-
*/
|
|
134
|
-
origin?: SpanOrigin | undefined;
|
|
135
160
|
}
|
|
136
161
|
/**
|
|
137
162
|
* A generic Span which holds trace data.
|
|
@@ -157,11 +182,9 @@ export interface Span {
|
|
|
157
182
|
*/
|
|
158
183
|
setAttributes(attributes: SpanAttributes): void;
|
|
159
184
|
/**
|
|
160
|
-
* Sets the status attribute on the current span
|
|
161
|
-
* See: {@sentry/core SpanStatusType} for possible values
|
|
162
|
-
* @param status http code used to set the status
|
|
185
|
+
* Sets the status attribute on the current span.
|
|
163
186
|
*/
|
|
164
|
-
setStatus(status:
|
|
187
|
+
setStatus(status: SpanStatus): this;
|
|
165
188
|
/**
|
|
166
189
|
* Update the name of the span.
|
|
167
190
|
*/
|
package/types/span.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,KAAK,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxC,KAAK,kBAA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AAW,IAAI,eAAe,CAAC;IAE/B;;OAEG;IACH,GAAG,CAAC,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI,CAAC;IAEvE;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
type SpanStatusType =
|
|
2
|
+
/** The operation completed successfully. */
|
|
3
|
+
'ok'
|
|
4
|
+
/** Deadline expired before operation could complete. */
|
|
5
|
+
| 'deadline_exceeded'
|
|
6
|
+
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
|
|
7
|
+
| 'unauthenticated'
|
|
8
|
+
/** 403 Forbidden */
|
|
9
|
+
| 'permission_denied'
|
|
10
|
+
/** 404 Not Found. Some requested entity (file or directory) was not found. */
|
|
11
|
+
| 'not_found'
|
|
12
|
+
/** 429 Too Many Requests */
|
|
13
|
+
| 'resource_exhausted'
|
|
14
|
+
/** Client specified an invalid argument. 4xx. */
|
|
15
|
+
| 'invalid_argument'
|
|
16
|
+
/** 501 Not Implemented */
|
|
17
|
+
| 'unimplemented'
|
|
18
|
+
/** 503 Service Unavailable */
|
|
19
|
+
| 'unavailable'
|
|
20
|
+
/** Other/generic 5xx. */
|
|
21
|
+
| 'internal_error'
|
|
22
|
+
/** Unknown. Any non-standard HTTP status code. */
|
|
23
|
+
| 'unknown_error'
|
|
24
|
+
/** The operation was cancelled (typically by the user). */
|
|
25
|
+
| 'cancelled'
|
|
26
|
+
/** Already exists (409) */
|
|
27
|
+
| 'already_exists'
|
|
28
|
+
/** Operation was rejected because the system is not in a state required for the operation's */
|
|
29
|
+
| 'failed_precondition'
|
|
30
|
+
/** The operation was aborted, typically due to a concurrency issue. */
|
|
31
|
+
| 'aborted'
|
|
32
|
+
/** Operation was attempted past the valid range. */
|
|
33
|
+
| 'out_of_range'
|
|
34
|
+
/** Unrecoverable data loss or corruption */
|
|
35
|
+
| 'data_loss';
|
|
36
|
+
declare const SPAN_STATUS_UNSET = 0;
|
|
37
|
+
declare const SPAN_STATUS_OK = 1;
|
|
38
|
+
declare const SPAN_STATUS_ERROR = 2;
|
|
39
|
+
/** The status code of a span. */
|
|
40
|
+
export type SpanStatusCode = typeof SPAN_STATUS_UNSET | typeof SPAN_STATUS_OK | typeof SPAN_STATUS_ERROR;
|
|
41
|
+
/**
|
|
42
|
+
* The status of a span.
|
|
43
|
+
* This can optionally contain a human-readable message.
|
|
44
|
+
*/
|
|
45
|
+
export interface SpanStatus {
|
|
46
|
+
/**
|
|
47
|
+
* The status code of this message.
|
|
48
|
+
* 0 = UNSET
|
|
49
|
+
* 1 = OK
|
|
50
|
+
* 2 = ERROR
|
|
51
|
+
*/
|
|
52
|
+
code: SpanStatusCode;
|
|
53
|
+
/**
|
|
54
|
+
* A developer-facing error message.
|
|
55
|
+
*/
|
|
56
|
+
message?: SpanStatusType | string;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=spanStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spanStatus.d.ts","sourceRoot":"","sources":["../../src/spanStatus.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc;AACjB,4CAA4C;AAC1C,IAAI;AACN,wDAAwD;GACtD,mBAAmB;AACrB,kFAAkF;GAChF,iBAAiB;AACnB,oBAAoB;GAClB,mBAAmB;AACrB,8EAA8E;GAC5E,WAAW;AACb,4BAA4B;GAC1B,oBAAoB;AACtB,iDAAiD;GAC/C,kBAAkB;AACpB,0BAA0B;GACxB,eAAe;AACjB,8BAA8B;GAC5B,aAAa;AACf,yBAAyB;GACvB,gBAAgB;AAClB,kDAAkD;GAChD,eAAe;AACjB,2DAA2D;GACzD,WAAW;AACb,2BAA2B;GACzB,gBAAgB;AAClB,+FAA+F;GAC7F,qBAAqB;AACvB,uEAAuE;GACrE,SAAS;AACX,oDAAoD;GAClD,cAAc;AAChB,4CAA4C;GAC1C,WAAW,CAAC;AAGhB,QAAA,MAAM,iBAAiB,IAAI,CAAC;AAC5B,QAAA,MAAM,cAAc,IAAI,CAAC;AACzB,QAAA,MAAM,iBAAiB,IAAI,CAAC;AAC5B,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG,OAAO,iBAAiB,GAAG,OAAO,cAAc,GAAG,OAAO,iBAAiB,CAAC;AAEzG;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,IAAI,EAAE,cAAc,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CACnC"}
|
package/types/stacktrace.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface Stacktrace {
|
|
|
4
4
|
frames?: StackFrame[];
|
|
5
5
|
frames_omitted?: [number, number];
|
|
6
6
|
}
|
|
7
|
-
export type StackParser = (stack: string,
|
|
7
|
+
export type StackParser = (stack: string, skipFirstLines?: number, framesToPop?: number) => StackFrame[];
|
|
8
8
|
export type StackLineParserFn = (line: string) => StackFrame | undefined;
|
|
9
9
|
export type StackLineParser = [number, StackLineParserFn];
|
|
10
10
|
//# sourceMappingURL=stacktrace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../../src/stacktrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../../src/stacktrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,UAAU,EAAE,CAAC;AACzG,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { Primitive } from './misc';
|
|
2
1
|
import type { Scope } from './scope';
|
|
3
|
-
import type { SpanAttributes,
|
|
4
|
-
|
|
5
|
-
export interface StartSpanOptions extends TransactionContext {
|
|
2
|
+
import type { SpanAttributes, SpanTimeInput } from './span';
|
|
3
|
+
export interface StartSpanOptions {
|
|
6
4
|
/** A manually specified start time for the created `Span` object. */
|
|
7
5
|
startTime?: SpanTimeInput;
|
|
8
6
|
/** If defined, start this span off this scope instead off the current scope. */
|
|
@@ -19,69 +17,7 @@ export interface StartSpanOptions extends TransactionContext {
|
|
|
19
17
|
* It is not guaranteed that a span started with this flag set to `true` will be sent as a transaction.
|
|
20
18
|
*/
|
|
21
19
|
forceTransaction?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* The origin of the span - if it comes from auto instrumentation or manual instrumentation.
|
|
24
|
-
*
|
|
25
|
-
* @deprecated Set `attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]` instead.
|
|
26
|
-
*/
|
|
27
|
-
origin?: SpanOrigin;
|
|
28
20
|
/** Attributes for the span. */
|
|
29
21
|
attributes?: SpanAttributes;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Manually set the end timestamp instead.
|
|
32
|
-
*/
|
|
33
|
-
trimEnd?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated This cannot be set manually anymore.
|
|
36
|
-
*/
|
|
37
|
-
parentSampled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated Use attributes or set data on scopes instead.
|
|
40
|
-
*/
|
|
41
|
-
metadata?: Partial<TransactionMetadata>;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated Use `span.setStatus()` instead.
|
|
44
|
-
*/
|
|
45
|
-
status?: string;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Use `scope` instead.
|
|
48
|
-
*/
|
|
49
|
-
parentSpanId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated You cannot manually set the span to sampled anymore.
|
|
52
|
-
*/
|
|
53
|
-
sampled?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated You cannot manually set the spanId anymore.
|
|
56
|
-
*/
|
|
57
|
-
spanId?: string;
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated You cannot manually set the traceId anymore.
|
|
60
|
-
*/
|
|
61
|
-
traceId?: string;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Use an attribute instead.
|
|
64
|
-
*/
|
|
65
|
-
source?: TransactionSource;
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated Use attributes or set tags on the scope instead.
|
|
68
|
-
*/
|
|
69
|
-
tags?: {
|
|
70
|
-
[key: string]: Primitive;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated Use attributes instead.
|
|
74
|
-
*/
|
|
75
|
-
data?: {
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated Use `startTime` instead.
|
|
80
|
-
*/
|
|
81
|
-
startTimestamp?: number;
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated Use `span.end()` instead.
|
|
84
|
-
*/
|
|
85
|
-
endTimestamp?: number;
|
|
86
22
|
}
|
|
87
23
|
//# sourceMappingURL=startSpanOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startSpanOptions.d.ts","sourceRoot":"","sources":["../../src/startSpanOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"startSpanOptions.d.ts","sourceRoot":"","sources":["../../src/startSpanOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,gFAAgF;IAChF,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,iEAAiE;IACjE,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,8DAA8D;IAC9D,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,+BAA+B;IAC/B,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B"}
|
package/types/transaction.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context } from './context';
|
|
2
2
|
import type { DynamicSamplingContext } from './envelope';
|
|
3
3
|
import type { MeasurementUnit } from './measurement';
|
|
4
|
-
import type { ExtractedNodeRequestData,
|
|
4
|
+
import type { ExtractedNodeRequestData, WorkerLocation } from './misc';
|
|
5
5
|
import type { PolymorphicRequest } from './polymorphics';
|
|
6
6
|
import type { Span, SpanAttributes, SpanContext } from './span';
|
|
7
7
|
/**
|
|
@@ -69,13 +69,6 @@ export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Sp
|
|
|
69
69
|
* @inheritDoc
|
|
70
70
|
*/
|
|
71
71
|
startTimestamp: number;
|
|
72
|
-
/**
|
|
73
|
-
* Tags for the transaction.
|
|
74
|
-
* @deprecated Use `getSpanAttributes(transaction)` instead.
|
|
75
|
-
*/
|
|
76
|
-
tags: {
|
|
77
|
-
[key: string]: Primitive;
|
|
78
|
-
};
|
|
79
72
|
/**
|
|
80
73
|
* Data for the transaction.
|
|
81
74
|
* @deprecated Use `getSpanAttributes(transaction)` instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,WA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D,KAAK;AACP,+BAA+B;GAC7B,OAAO;AACT,4CAA4C;GAC1C,MAAM;AACR,0EAA0E;GACxE,WAAW;AACb,qDAAqD;GACnD,MAAM,CAAC"}
|
package/types/transport.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface BaseTransportOptions extends InternalBaseTransportOptions {
|
|
|
19
19
|
url: string;
|
|
20
20
|
}
|
|
21
21
|
export interface Transport {
|
|
22
|
-
send(request: Envelope): PromiseLike<
|
|
22
|
+
send(request: Envelope): PromiseLike<TransportMakeRequestResponse>;
|
|
23
23
|
flush(timeout?: number): PromiseLike<boolean>;
|
|
24
24
|
}
|
|
25
25
|
export type TransportRequestExecutor = (request: TransportRequest) => PromiseLike<TransportMakeRequestResponse>;
|
package/types/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;QAC7B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IAIxE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;QAC7B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IAIxE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAC;IACnE,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,WAAW,CAAC,4BAA4B,CAAC,CAAC"}
|
package/types/user.d.ts
CHANGED
package/types/user.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type AttachmentType = 'event.attachment' | 'event.minidump' | 'event.applecrashreport' | 'unreal.context' | 'unreal.logs';
|
|
1
2
|
/**
|
|
2
3
|
* An attachment to an event. This is used to upload arbitrary data to Sentry.
|
|
3
4
|
*
|
|
@@ -23,6 +24,6 @@ export interface Attachment {
|
|
|
23
24
|
/**
|
|
24
25
|
* The type of the attachment. Defaults to `event.attachment` if not specified.
|
|
25
26
|
*/
|
|
26
|
-
attachmentType?:
|
|
27
|
+
attachmentType?: AttachmentType;
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=attachment.d.ts.map
|
package/types-ts3.8/client.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ import { Scope } from './scope';
|
|
|
14
14
|
import { SdkMetadata } from './sdkmetadata';
|
|
15
15
|
import { Session, SessionAggregates } from './session';
|
|
16
16
|
import { SeverityLevel } from './severity';
|
|
17
|
+
import { Span } from './span';
|
|
17
18
|
import { StartSpanOptions } from './startSpanOptions';
|
|
18
|
-
import { Transaction } from './transaction';
|
|
19
19
|
import { Transport, TransportMakeRequestResponse } from './transport';
|
|
20
20
|
/**
|
|
21
21
|
* User-Facing Sentry SDK Client.
|
|
@@ -146,6 +146,8 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
146
146
|
sendEvent(event: Event, hint?: EventHint): void;
|
|
147
147
|
/** Submits the session to Sentry */
|
|
148
148
|
sendSession(session: Session | SessionAggregates): void;
|
|
149
|
+
/** Sends an envelope to Sentry */
|
|
150
|
+
sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse>;
|
|
149
151
|
/**
|
|
150
152
|
* Record on the client that an event got dropped (ie, an event that will not be sent to sentry).
|
|
151
153
|
*
|
|
@@ -155,15 +157,19 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
155
157
|
*/
|
|
156
158
|
recordDroppedEvent(reason: EventDropReason, dataCategory: DataCategory, event?: Event): void;
|
|
157
159
|
/**
|
|
158
|
-
* Register a callback for
|
|
159
|
-
* Receives the
|
|
160
|
+
* Register a callback for whenever a span is started.
|
|
161
|
+
* Receives the span as argument.
|
|
160
162
|
*/
|
|
161
|
-
on(hook: '
|
|
163
|
+
on(hook: 'spanStart', callback: (span: Span) => void): void;
|
|
162
164
|
/**
|
|
163
|
-
* Register a callback for
|
|
164
|
-
* Receives the
|
|
165
|
+
* Register a callback for whenever a span is ended.
|
|
166
|
+
* Receives the span as argument.
|
|
165
167
|
*/
|
|
166
|
-
on(hook: '
|
|
168
|
+
on(hook: 'spanEnd', callback: (span: Span) => void): void;
|
|
169
|
+
/**
|
|
170
|
+
* Register a callback for when an idle span is allowed to auto-finish.
|
|
171
|
+
*/
|
|
172
|
+
on(hook: 'idleSpanEnableAutoFinish', callback: (span: Span) => void): void;
|
|
167
173
|
/**
|
|
168
174
|
* Register a callback for transaction start and finish.
|
|
169
175
|
*/
|
|
@@ -183,7 +189,7 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
183
189
|
/**
|
|
184
190
|
* Register a callback for when an event has been sent.
|
|
185
191
|
*/
|
|
186
|
-
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse
|
|
192
|
+
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse) => void): void;
|
|
187
193
|
/**
|
|
188
194
|
* Register a callback before a breadcrumb is added.
|
|
189
195
|
*/
|
|
@@ -192,13 +198,6 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
192
198
|
* Register a callback when a DSC (Dynamic Sampling Context) is created.
|
|
193
199
|
*/
|
|
194
200
|
on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
|
|
195
|
-
/**
|
|
196
|
-
* Register a callback when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).
|
|
197
|
-
* The option argument may be mutated to drop the span.
|
|
198
|
-
*/
|
|
199
|
-
on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
|
|
200
|
-
drop: boolean;
|
|
201
|
-
}) => void): void;
|
|
202
201
|
/**
|
|
203
202
|
* Register a callback when a Feedback event has been prepared.
|
|
204
203
|
* This should be used to mutate the event. The options argument can hint
|
|
@@ -210,7 +209,10 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
210
209
|
/**
|
|
211
210
|
* A hook for the browser tracing integrations to trigger a span start for a page load.
|
|
212
211
|
*/
|
|
213
|
-
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions
|
|
212
|
+
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions, traceOptions?: {
|
|
213
|
+
sentryTrace?: string | undefined;
|
|
214
|
+
baggage?: string | undefined;
|
|
215
|
+
}) => void): void;
|
|
214
216
|
/**
|
|
215
217
|
* A hook for browser tracing integrations to trigger a span for a navigation.
|
|
216
218
|
*/
|
|
@@ -223,16 +225,14 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
223
225
|
* A hook that is called when the client is closing
|
|
224
226
|
*/
|
|
225
227
|
on(hook: 'close', callback: () => void): void;
|
|
228
|
+
/** Fire a hook whener a span starts. */
|
|
229
|
+
emit(hook: 'spanStart', span: Span): void;
|
|
230
|
+
/** Fire a hook whener a span ends. */
|
|
231
|
+
emit(hook: 'spanEnd', span: Span): void;
|
|
226
232
|
/**
|
|
227
|
-
* Fire a hook
|
|
228
|
-
* Expects to be given a transaction as the second argument.
|
|
233
|
+
* Fire a hook indicating that an idle span is allowed to auto finish.
|
|
229
234
|
*/
|
|
230
|
-
emit(hook: '
|
|
231
|
-
/**
|
|
232
|
-
* Fire a hook event for transaction finish.
|
|
233
|
-
* Expects to be given a transaction as the second argument.
|
|
234
|
-
*/
|
|
235
|
-
emit(hook: 'finishTransaction', transaction: Transaction): void;
|
|
235
|
+
emit(hook: 'idleSpanEnableAutoFinish', span: Span): void;
|
|
236
236
|
emit(hook: 'beforeEnvelope', envelope: Envelope): void;
|
|
237
237
|
/**
|
|
238
238
|
* Fire a hook event before sending an event.
|
|
@@ -245,7 +245,7 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
245
245
|
* Expects to be given an Event & EventHint as the second/third argument.
|
|
246
246
|
*/
|
|
247
247
|
emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
|
|
248
|
-
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse
|
|
248
|
+
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse): void;
|
|
249
249
|
/**
|
|
250
250
|
* Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
|
|
251
251
|
*/
|
|
@@ -254,14 +254,6 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
254
254
|
* Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
|
|
255
255
|
*/
|
|
256
256
|
emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;
|
|
257
|
-
/**
|
|
258
|
-
* Fire a hook for when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).
|
|
259
|
-
* Expects the OTEL span & as second argument, and an option object as third argument.
|
|
260
|
-
* The option argument may be mutated to drop the span.
|
|
261
|
-
*/
|
|
262
|
-
emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
|
|
263
|
-
drop: boolean;
|
|
264
|
-
}): void;
|
|
265
257
|
/**
|
|
266
258
|
* Fire a hook event for after preparing a feedback event. Events to be given
|
|
267
259
|
* a feedback event as the second argument, and an optional options object as
|
|
@@ -273,7 +265,10 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
273
265
|
/**
|
|
274
266
|
* Emit a hook event for browser tracing integrations to trigger a span start for a page load.
|
|
275
267
|
*/
|
|
276
|
-
emit(hook: 'startPageLoadSpan', options: StartSpanOptions
|
|
268
|
+
emit(hook: 'startPageLoadSpan', options: StartSpanOptions, traceOptions?: {
|
|
269
|
+
sentryTrace?: string | undefined;
|
|
270
|
+
baggage?: string | undefined;
|
|
271
|
+
}): void;
|
|
277
272
|
/**
|
|
278
273
|
* Emit a hook event for browser tracing integrations to trigger a span for a navigation.
|
|
279
274
|
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { AttachmentType } from './attachment';
|
|
1
2
|
import { SerializedCheckIn } from './checkin';
|
|
2
3
|
import { ClientReport } from './clientreport';
|
|
3
4
|
import { DsnComponents } from './dsn';
|
|
4
5
|
import { Event } from './event';
|
|
5
|
-
import { FeedbackEvent } from './feedback';
|
|
6
|
+
import { FeedbackEvent, UserFeedback } from './feedback';
|
|
6
7
|
import { Profile } from './profiling';
|
|
7
8
|
import { ReplayEvent, ReplayRecordingData } from './replay';
|
|
8
9
|
import { SdkInfo } from './sdkinfo';
|
|
9
10
|
import { SerializedSession, Session, SessionAggregates } from './session';
|
|
10
11
|
import { Transaction } from './transaction';
|
|
11
|
-
import { UserFeedback } from './user';
|
|
12
12
|
export type DynamicSamplingContext = {
|
|
13
13
|
trace_id: Transaction['traceId'];
|
|
14
14
|
public_key: DsnComponents['publicKey'];
|
|
@@ -46,7 +46,7 @@ type AttachmentItemHeaders = {
|
|
|
46
46
|
length: number;
|
|
47
47
|
filename: string;
|
|
48
48
|
content_type?: string;
|
|
49
|
-
attachment_type?:
|
|
49
|
+
attachment_type?: AttachmentType;
|
|
50
50
|
};
|
|
51
51
|
type UserFeedbackItemHeaders = {
|
|
52
52
|
type: 'user_report';
|
package/types-ts3.8/event.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Request } from './request';
|
|
|
11
11
|
import { CaptureContext } from './scope';
|
|
12
12
|
import { SdkInfo } from './sdkinfo';
|
|
13
13
|
import { SeverityLevel } from './severity';
|
|
14
|
-
import { MetricSummary,
|
|
14
|
+
import { MetricSummary, SpanJSON } from './span';
|
|
15
15
|
import { Thread } from './thread';
|
|
16
16
|
import { TransactionSource } from './transaction';
|
|
17
17
|
import { User } from './user';
|
|
@@ -50,7 +50,7 @@ export interface Event {
|
|
|
50
50
|
extra?: Extras;
|
|
51
51
|
user?: User;
|
|
52
52
|
type?: EventType;
|
|
53
|
-
spans?:
|
|
53
|
+
spans?: SpanJSON[];
|
|
54
54
|
measurements?: Measurements;
|
|
55
55
|
debug_meta?: DebugMeta;
|
|
56
56
|
sdkProcessingMetadata?: {
|
|
@@ -87,14 +87,4 @@ export interface EventHint {
|
|
|
87
87
|
data?: any;
|
|
88
88
|
integrations?: string[];
|
|
89
89
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Represents the event that's sent in an event envelope, omitting interfaces that are no longer representative after
|
|
92
|
-
* event serialization.
|
|
93
|
-
*/
|
|
94
|
-
export interface SerializedEvent extends Pick<Event, Exclude<keyof Event, 'spans'>> {
|
|
95
|
-
/**
|
|
96
|
-
* POJO objects of spans belonging to this event.
|
|
97
|
-
*/
|
|
98
|
-
spans?: SpanJSON[];
|
|
99
|
-
}
|
|
100
90
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { Event } from './event';
|
|
2
|
-
|
|
2
|
+
import { User } from './user';
|
|
3
|
+
/**
|
|
4
|
+
* Crash report feedback object
|
|
5
|
+
*/
|
|
6
|
+
export interface UserFeedback {
|
|
7
|
+
event_id: string;
|
|
8
|
+
email: User['email'];
|
|
9
|
+
name: string;
|
|
10
|
+
comments: string;
|
|
11
|
+
}
|
|
12
|
+
interface FeedbackContext extends Record<string, unknown> {
|
|
3
13
|
message: string;
|
|
4
14
|
contact_email?: string;
|
|
5
15
|
name?: string;
|
|
@@ -16,4 +26,5 @@ export interface FeedbackEvent extends Event {
|
|
|
16
26
|
feedback: FeedbackContext;
|
|
17
27
|
};
|
|
18
28
|
}
|
|
29
|
+
export {};
|
|
19
30
|
//# sourceMappingURL=feedback.d.ts.map
|
package/types-ts3.8/hub.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { Primitive } from './misc';
|
|
|
7
7
|
import { Scope } from './scope';
|
|
8
8
|
import { Session } from './session';
|
|
9
9
|
import { SeverityLevel } from './severity';
|
|
10
|
-
import { CustomSamplingContext, Transaction, TransactionContext } from './transaction';
|
|
11
10
|
import { User } from './user';
|
|
12
11
|
/**
|
|
13
12
|
* Internal class used to make sure we always have the latest internal functions
|
|
@@ -188,26 +187,6 @@ export interface Hub {
|
|
|
188
187
|
* @deprecated Use `Sentry.getClient().getIntegration()` instead.
|
|
189
188
|
*/
|
|
190
189
|
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
191
|
-
/**
|
|
192
|
-
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
193
|
-
*
|
|
194
|
-
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
|
|
195
|
-
* new child span within the transaction or any span, call the respective `.startChild()` method.
|
|
196
|
-
*
|
|
197
|
-
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
|
|
198
|
-
*
|
|
199
|
-
* The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its
|
|
200
|
-
* finished child spans will be sent to Sentry.
|
|
201
|
-
*
|
|
202
|
-
* @param context Properties of the new `Transaction`.
|
|
203
|
-
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
|
|
204
|
-
* default values). See {@link Options.tracesSampler}.
|
|
205
|
-
*
|
|
206
|
-
* @returns The transaction which was just started
|
|
207
|
-
*
|
|
208
|
-
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
|
|
209
|
-
*/
|
|
210
|
-
startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;
|
|
211
190
|
/**
|
|
212
191
|
* Starts a new `Session`, sets on the current scope and returns it.
|
|
213
192
|
*
|