@sentry/types 7.105.0 → 8.0.0-alpha.2
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/package.json +2 -2
- package/types/attachment.d.ts +22 -1
- package/types/attachment.d.ts.map +1 -1
- package/types/breadcrumb.d.ts +2 -2
- package/types/breadcrumb.d.ts.map +1 -1
- package/types/client.d.ts +52 -64
- package/types/client.d.ts.map +1 -1
- package/types/datacategory.d.ts +1 -1
- package/types/datacategory.d.ts.map +1 -1
- package/types/envelope.d.ts +2 -13
- package/types/envelope.d.ts.map +1 -1
- package/types/event.d.ts +4 -14
- package/types/event.d.ts.map +1 -1
- package/types/hub.d.ts +3 -34
- package/types/hub.d.ts.map +1 -1
- package/types/index.d.ts +4 -5
- package/types/index.d.ts.map +1 -1
- package/types/integration.d.ts +2 -6
- package/types/integration.d.ts.map +1 -1
- package/types/options.d.ts +22 -22
- package/types/options.d.ts.map +1 -1
- package/types/scope.d.ts +10 -6
- package/types/scope.d.ts.map +1 -1
- package/types/severity.d.ts +0 -18
- package/types/severity.d.ts.map +1 -1
- package/types/span.d.ts +18 -201
- 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/startSpanOptions.d.ts +0 -14
- package/types/startSpanOptions.d.ts.map +1 -1
- package/types/transaction.d.ts +20 -40
- package/types/transaction.d.ts.map +1 -1
- package/types/transport.d.ts +1 -3
- package/types/transport.d.ts.map +1 -1
- package/types/user.d.ts +0 -4
- package/types/user.d.ts.map +1 -1
- package/types-ts3.8/attachment.d.ts +22 -1
- package/types-ts3.8/breadcrumb.d.ts +2 -2
- package/types-ts3.8/client.d.ts +52 -64
- package/types-ts3.8/datacategory.d.ts +1 -1
- package/types-ts3.8/envelope.d.ts +2 -13
- package/types-ts3.8/event.d.ts +4 -14
- package/types-ts3.8/hub.d.ts +3 -34
- package/types-ts3.8/index.d.ts +4 -5
- package/types-ts3.8/integration.d.ts +2 -6
- package/types-ts3.8/options.d.ts +22 -22
- package/types-ts3.8/scope.d.ts +10 -6
- package/types-ts3.8/severity.d.ts +0 -18
- package/types-ts3.8/span.d.ts +18 -201
- package/types-ts3.8/spanStatus.d.ts +59 -0
- package/types-ts3.8/startSpanOptions.d.ts +0 -14
- package/types-ts3.8/transaction.d.ts +20 -40
- package/types-ts3.8/transport.d.ts +1 -3
- package/types-ts3.8/user.d.ts +0 -4
- package/types/instrumenter.d.ts +0 -2
- package/types/instrumenter.d.ts.map +0 -1
- package/types/textencoder.d.ts +0 -15
- package/types/textencoder.d.ts.map +0 -1
- package/types-ts3.8/instrumenter.d.ts +0 -2
- package/types-ts3.8/textencoder.d.ts +0 -15
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Context } from './context';
|
|
2
2
|
import { DynamicSamplingContext } from './envelope';
|
|
3
|
-
import { Instrumenter } from './instrumenter';
|
|
4
3
|
import { MeasurementUnit } from './measurement';
|
|
5
4
|
import { ExtractedNodeRequestData, Primitive, WorkerLocation } from './misc';
|
|
6
5
|
import { PolymorphicRequest } from './polymorphics';
|
|
@@ -33,16 +32,24 @@ export interface TransactionContext extends SpanContext {
|
|
|
33
32
|
/**
|
|
34
33
|
* Data pulled from a `sentry-trace` header
|
|
35
34
|
*/
|
|
36
|
-
export
|
|
35
|
+
export interface TraceparentData {
|
|
36
|
+
/**
|
|
37
|
+
* Trace ID
|
|
38
|
+
*/
|
|
39
|
+
traceId?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Parent Span ID
|
|
42
|
+
*/
|
|
43
|
+
parentSpanId?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* If this transaction has a parent, the parent's sampling decision
|
|
46
|
+
*/
|
|
47
|
+
parentSampled?: boolean | undefined;
|
|
48
|
+
}
|
|
37
49
|
/**
|
|
38
50
|
* Transaction "Class", inherits Span only has `setName`
|
|
39
51
|
*/
|
|
40
|
-
export interface Transaction extends
|
|
41
|
-
/**
|
|
42
|
-
* Human-readable identifier for the transaction.
|
|
43
|
-
* @deprecated Use `spanToJSON(span).description` instead.
|
|
44
|
-
*/
|
|
45
|
-
name: string;
|
|
52
|
+
export interface Transaction extends Pick<TransactionContext, Exclude<keyof TransactionContext, 'name' | 'op'>>, Span {
|
|
46
53
|
/**
|
|
47
54
|
* The ID of the transaction.
|
|
48
55
|
* @deprecated Use `spanContext().spanId` instead.
|
|
@@ -86,18 +93,6 @@ export interface Transaction extends TransactionContext, Pick<Span, Exclude<keyo
|
|
|
86
93
|
* @deprecated Use attributes or store data on the scope instead.
|
|
87
94
|
*/
|
|
88
95
|
metadata: TransactionMetadata;
|
|
89
|
-
/**
|
|
90
|
-
* The instrumenter that created this transaction.
|
|
91
|
-
*
|
|
92
|
-
* @deprecated This field will be removed in v8.
|
|
93
|
-
*/
|
|
94
|
-
instrumenter: Instrumenter;
|
|
95
|
-
/**
|
|
96
|
-
* Set the name of the transaction
|
|
97
|
-
*
|
|
98
|
-
* @deprecated Use `.updateName()` and `.setAttribute()` instead.
|
|
99
|
-
*/
|
|
100
|
-
setName(name: string, source?: TransactionMetadata['source']): void;
|
|
101
96
|
/**
|
|
102
97
|
* Set the context of a transaction event.
|
|
103
98
|
* @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.
|
|
@@ -118,11 +113,6 @@ export interface Transaction extends TransactionContext, Pick<Span, Exclude<keyo
|
|
|
118
113
|
* @deprecated Use `toJSON()` or access the fields directly instead.
|
|
119
114
|
*/
|
|
120
115
|
toContext(): TransactionContext;
|
|
121
|
-
/**
|
|
122
|
-
* Updates the current transaction with a new `TransactionContext`.
|
|
123
|
-
* @deprecated Update the fields directly instead.
|
|
124
|
-
*/
|
|
125
|
-
updateWithContext(transactionContext: TransactionContext): this;
|
|
126
116
|
/**
|
|
127
117
|
* Set metadata for this transaction.
|
|
128
118
|
* @deprecated Use attributes or store data on the scope instead.
|
|
@@ -135,10 +125,12 @@ export interface Transaction extends TransactionContext, Pick<Span, Exclude<keyo
|
|
|
135
125
|
*/
|
|
136
126
|
getDynamicSamplingContext(): Partial<DynamicSamplingContext>;
|
|
137
127
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
128
|
+
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
|
|
129
|
+
* Also the `sampled` decision will be inherited.
|
|
130
|
+
*
|
|
131
|
+
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
|
|
140
132
|
*/
|
|
141
|
-
|
|
133
|
+
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
|
|
142
134
|
}
|
|
143
135
|
/**
|
|
144
136
|
* Context data passed by the user when starting a transaction, to be used by the tracesSampler method.
|
|
@@ -183,21 +175,9 @@ export interface TransactionMetadata {
|
|
|
183
175
|
dynamicSamplingContext?: Partial<DynamicSamplingContext>;
|
|
184
176
|
/** For transactions tracing server-side request handling, the request being tracked. */
|
|
185
177
|
request?: PolymorphicRequest;
|
|
186
|
-
/** Compatibility shim for transitioning to the `RequestData` integration. The options passed to our Express request
|
|
187
|
-
* handler controlling what request data is added to the event.
|
|
188
|
-
* TODO (v8): This should go away
|
|
189
|
-
*/
|
|
190
|
-
requestDataOptionsFromExpressHandler?: {
|
|
191
|
-
[key: string]: unknown;
|
|
192
|
-
};
|
|
193
178
|
/** For transactions tracing server-side request handling, the path of the request being tracked. */
|
|
194
179
|
/** TODO: If we rm -rf `instrumentServer`, this can go, too */
|
|
195
180
|
requestPath?: string;
|
|
196
|
-
/**
|
|
197
|
-
* Information on how a transaction name was generated.
|
|
198
|
-
* @deprecated Use `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE` attribute instead.
|
|
199
|
-
*/
|
|
200
|
-
source: TransactionSource;
|
|
201
181
|
/**
|
|
202
182
|
* Metadata for the transaction's spans, keyed by spanId.
|
|
203
183
|
* @deprecated This will be removed in v8.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Client } from './client';
|
|
2
2
|
import { Envelope } from './envelope';
|
|
3
|
-
import { TextEncoderInternal } from './textencoder';
|
|
4
3
|
export type TransportRequest = {
|
|
5
4
|
body: string | Uint8Array;
|
|
6
5
|
};
|
|
@@ -15,13 +14,12 @@ export type TransportMakeRequestResponse = {
|
|
|
15
14
|
export interface InternalBaseTransportOptions {
|
|
16
15
|
bufferSize?: number;
|
|
17
16
|
recordDroppedEvent: Client['recordDroppedEvent'];
|
|
18
|
-
textEncoder?: TextEncoderInternal;
|
|
19
17
|
}
|
|
20
18
|
export interface BaseTransportOptions extends InternalBaseTransportOptions {
|
|
21
19
|
url: string;
|
|
22
20
|
}
|
|
23
21
|
export interface Transport {
|
|
24
|
-
send(request: Envelope): PromiseLike<
|
|
22
|
+
send(request: Envelope): PromiseLike<TransportMakeRequestResponse>;
|
|
25
23
|
flush(timeout?: number): PromiseLike<boolean>;
|
|
26
24
|
}
|
|
27
25
|
export type TransportRequestExecutor = (request: TransportRequest) => PromiseLike<TransportMakeRequestResponse>;
|
package/types-ts3.8/user.d.ts
CHANGED
|
@@ -7,10 +7,6 @@ export interface User {
|
|
|
7
7
|
ip_address?: string;
|
|
8
8
|
email?: string;
|
|
9
9
|
username?: string;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Functonality for segment has been removed. Use a custom tag or context instead to capture this information.
|
|
12
|
-
*/
|
|
13
|
-
segment?: string;
|
|
14
10
|
}
|
|
15
11
|
export interface UserFeedback {
|
|
16
12
|
event_id: string;
|
package/types/instrumenter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumenter.d.ts","sourceRoot":"","sources":["../../src/instrumenter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|
package/types/textencoder.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored type from TS 3.8 `typescript/lib/lib.dom.d.ts`.
|
|
3
|
-
*
|
|
4
|
-
* Type is vendored in so that users don't have to opt-in to DOM types.
|
|
5
|
-
*/
|
|
6
|
-
export interface TextEncoderCommon {
|
|
7
|
-
/**
|
|
8
|
-
* Returns "utf-8".
|
|
9
|
-
*/
|
|
10
|
-
readonly encoding: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TextEncoderInternal extends TextEncoderCommon {
|
|
13
|
-
encode(input?: string): Uint8Array;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=textencoder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textencoder.d.ts","sourceRoot":"","sources":["../../src/textencoder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAGD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACpC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored type from TS 3.8 `typescript/lib/lib.dom.d.ts`.
|
|
3
|
-
*
|
|
4
|
-
* Type is vendored in so that users don't have to opt-in to DOM types.
|
|
5
|
-
*/
|
|
6
|
-
export interface TextEncoderCommon {
|
|
7
|
-
/**
|
|
8
|
-
* Returns "utf-8".
|
|
9
|
-
*/
|
|
10
|
-
readonly encoding: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TextEncoderInternal extends TextEncoderCommon {
|
|
13
|
-
encode(input?: string): Uint8Array;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=textencoder.d.ts.map
|