@sentry/types 7.105.0 → 8.0.0-alpha.1
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 +54 -51
- 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 +2 -2
- 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 +2 -4
- 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 +16 -198
- package/types/span.d.ts.map +1 -1
- package/types/startSpanOptions.d.ts +0 -10
- 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 +0 -2
- 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 +54 -51
- 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 +2 -2
- package/types-ts3.8/hub.d.ts +3 -34
- package/types-ts3.8/index.d.ts +2 -4
- 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 +16 -198
- package/types-ts3.8/startSpanOptions.d.ts +0 -10
- package/types-ts3.8/transaction.d.ts +20 -40
- package/types-ts3.8/transport.d.ts +0 -2
- 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
package/types/transaction.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Context } from './context';
|
|
2
2
|
import type { DynamicSamplingContext } from './envelope';
|
|
3
|
-
import type { Instrumenter } from './instrumenter';
|
|
4
3
|
import type { MeasurementUnit } from './measurement';
|
|
5
4
|
import type { ExtractedNodeRequestData, Primitive, WorkerLocation } from './misc';
|
|
6
5
|
import type { 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 Omit<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, Omit<Span, 'setName' |
|
|
|
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, Omit<Span, 'setName' |
|
|
|
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, Omit<Span, 'setName' |
|
|
|
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 +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,
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"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"}
|
package/types/transport.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Client } from './client';
|
|
2
2
|
import type { Envelope } from './envelope';
|
|
3
|
-
import type { TextEncoderInternal } from './textencoder';
|
|
4
3
|
export type TransportRequest = {
|
|
5
4
|
body: string | Uint8Array;
|
|
6
5
|
};
|
|
@@ -15,7 +14,6 @@ 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;
|
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;
|
|
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;IAExB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,WAAW,CAAC,IAAI,GAAG,4BAA4B,CAAC,CAAC;IAC1E,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
|
@@ -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/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;
|
|
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;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An attachment to an event. This is used to upload arbitrary data to Sentry.
|
|
3
|
+
*
|
|
4
|
+
* Please take care to not add sensitive information in attachments.
|
|
5
|
+
*
|
|
6
|
+
* https://develop.sentry.dev/sdk/envelopes/#attachment
|
|
7
|
+
*/
|
|
1
8
|
export interface Attachment {
|
|
9
|
+
/**
|
|
10
|
+
* The attachment data. Can be a string or a binary data (byte array)
|
|
11
|
+
*/
|
|
2
12
|
data: string | Uint8Array;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the uploaded file without a path component
|
|
15
|
+
*/
|
|
3
16
|
filename: string;
|
|
17
|
+
/**
|
|
18
|
+
* The content type of the attachment payload. Defaults to `application/octet-stream` if not specified.
|
|
19
|
+
*
|
|
20
|
+
* Any valid [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) is allowed.
|
|
21
|
+
*/
|
|
4
22
|
contentType?: string;
|
|
5
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The type of the attachment. Defaults to `event.attachment` if not specified.
|
|
25
|
+
*/
|
|
26
|
+
attachmentType?: 'event.attachment' | 'event.minidump' | 'event.applecrashreport' | 'unreal.context' | 'unreal.logs';
|
|
6
27
|
}
|
|
7
28
|
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SeverityLevel } from './severity';
|
|
2
2
|
/** JSDoc */
|
|
3
3
|
export interface Breadcrumb {
|
|
4
4
|
type?: string;
|
|
5
|
-
level?:
|
|
5
|
+
level?: SeverityLevel;
|
|
6
6
|
event_id?: string;
|
|
7
7
|
category?: string;
|
|
8
8
|
message?: string;
|
package/types-ts3.8/client.d.ts
CHANGED
|
@@ -8,13 +8,12 @@ import { Event, EventHint } from './event';
|
|
|
8
8
|
import { EventProcessor } from './eventprocessor';
|
|
9
9
|
import { FeedbackEvent } from './feedback';
|
|
10
10
|
import { Integration, IntegrationClass } from './integration';
|
|
11
|
-
import { MetricBucketItem } from './metrics';
|
|
12
11
|
import { ClientOptions } from './options';
|
|
13
12
|
import { ParameterizedString } from './parameterize';
|
|
14
13
|
import { Scope } from './scope';
|
|
15
14
|
import { SdkMetadata } from './sdkmetadata';
|
|
16
15
|
import { Session, SessionAggregates } from './session';
|
|
17
|
-
import {
|
|
16
|
+
import { SeverityLevel } from './severity';
|
|
18
17
|
import { StartSpanOptions } from './startSpanOptions';
|
|
19
18
|
import { Transaction } from './transaction';
|
|
20
19
|
import { Transport, TransportMakeRequestResponse } from './transport';
|
|
@@ -46,7 +45,7 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
46
45
|
* @param scope An optional scope containing event metadata.
|
|
47
46
|
* @returns The event id
|
|
48
47
|
*/
|
|
49
|
-
captureMessage(message: string, level?:
|
|
48
|
+
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint, scope?: Scope): string | undefined;
|
|
50
49
|
/**
|
|
51
50
|
* Captures a manually created event and sends it to Sentry.
|
|
52
51
|
*
|
|
@@ -61,7 +60,7 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
61
60
|
*
|
|
62
61
|
* @param session Session to be delivered
|
|
63
62
|
*/
|
|
64
|
-
captureSession
|
|
63
|
+
captureSession(session: Session): void;
|
|
65
64
|
/**
|
|
66
65
|
* Create a cron monitor check in and send it to Sentry. This method is not available on all clients.
|
|
67
66
|
*
|
|
@@ -79,9 +78,8 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
79
78
|
/**
|
|
80
79
|
* @inheritdoc
|
|
81
80
|
*
|
|
82
|
-
* TODO (v8): Make this a required method.
|
|
83
81
|
*/
|
|
84
|
-
getSdkMetadata
|
|
82
|
+
getSdkMetadata(): SdkMetadata | undefined;
|
|
85
83
|
/**
|
|
86
84
|
* Returns the transport that is used by the client.
|
|
87
85
|
* Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.
|
|
@@ -109,32 +107,27 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
109
107
|
flush(timeout?: number): PromiseLike<boolean>;
|
|
110
108
|
/**
|
|
111
109
|
* Adds an event processor that applies to any event processed by this client.
|
|
112
|
-
*
|
|
113
|
-
* TODO (v8): Make this a required method.
|
|
114
110
|
*/
|
|
115
|
-
addEventProcessor
|
|
111
|
+
addEventProcessor(eventProcessor: EventProcessor): void;
|
|
116
112
|
/**
|
|
117
113
|
* Get all added event processors for this client.
|
|
118
|
-
*
|
|
119
|
-
* TODO (v8): Make this a required method.
|
|
120
114
|
*/
|
|
121
|
-
getEventProcessors
|
|
115
|
+
getEventProcessors(): EventProcessor[];
|
|
122
116
|
/**
|
|
123
117
|
* Returns the client's instance of the given integration class, it any.
|
|
124
118
|
* @deprecated Use `getIntegrationByName()` instead.
|
|
125
119
|
*/
|
|
126
120
|
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
127
121
|
/** Get the instance of the integration with the given name on the client, if it was added. */
|
|
128
|
-
getIntegrationByName
|
|
122
|
+
getIntegrationByName<T extends Integration = Integration>(name: string): T | undefined;
|
|
129
123
|
/**
|
|
130
124
|
* Add an integration to the client.
|
|
131
125
|
* This can be used to e.g. lazy load integrations.
|
|
132
126
|
* In most cases, this should not be necessary, and you're better off just passing the integrations via `integrations: []` at initialization time.
|
|
133
127
|
* However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.
|
|
134
128
|
*
|
|
135
|
-
* TODO (v8): Make this a required method.
|
|
136
129
|
* */
|
|
137
|
-
addIntegration
|
|
130
|
+
addIntegration(integration: Integration): void;
|
|
138
131
|
/**
|
|
139
132
|
* This is an internal function to setup all integrations that should run on the client.
|
|
140
133
|
* @deprecated Use `client.init()` instead.
|
|
@@ -144,11 +137,11 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
144
137
|
* Initialize this client.
|
|
145
138
|
* Call this after the client was set on a scope.
|
|
146
139
|
*/
|
|
147
|
-
init
|
|
140
|
+
init(): void;
|
|
148
141
|
/** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */
|
|
149
142
|
eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
|
|
150
143
|
/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
|
|
151
|
-
eventFromMessage(message: ParameterizedString, level?:
|
|
144
|
+
eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
|
|
152
145
|
/** Submits the event to Sentry */
|
|
153
146
|
sendEvent(event: Event, hint?: EventHint): void;
|
|
154
147
|
/** Submits the session to Sentry */
|
|
@@ -161,55 +154,49 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
161
154
|
* @param event The dropped event.
|
|
162
155
|
*/
|
|
163
156
|
recordDroppedEvent(reason: EventDropReason, dataCategory: DataCategory, event?: Event): void;
|
|
164
|
-
/**
|
|
165
|
-
* Captures serialized metrics and sends them to Sentry.
|
|
166
|
-
*
|
|
167
|
-
* @experimental This API is experimental and might experience breaking changes
|
|
168
|
-
*/
|
|
169
|
-
captureAggregateMetrics?(metricBucketItems: Array<MetricBucketItem>): void;
|
|
170
157
|
/**
|
|
171
158
|
* Register a callback for transaction start.
|
|
172
159
|
* Receives the transaction as argument.
|
|
173
160
|
*/
|
|
174
|
-
on
|
|
161
|
+
on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;
|
|
175
162
|
/**
|
|
176
163
|
* Register a callback for transaction finish.
|
|
177
164
|
* Receives the transaction as argument.
|
|
178
165
|
*/
|
|
179
|
-
on
|
|
166
|
+
on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;
|
|
180
167
|
/**
|
|
181
168
|
* Register a callback for transaction start and finish.
|
|
182
169
|
*/
|
|
183
|
-
on
|
|
170
|
+
on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
|
|
184
171
|
/**
|
|
185
172
|
* Register a callback for before sending an event.
|
|
186
173
|
* This is called right before an event is sent and should not be used to mutate the event.
|
|
187
174
|
* Receives an Event & EventHint as arguments.
|
|
188
175
|
*/
|
|
189
|
-
on
|
|
176
|
+
on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
|
|
190
177
|
/**
|
|
191
178
|
* Register a callback for preprocessing an event,
|
|
192
179
|
* before it is passed to (global) event processors.
|
|
193
180
|
* Receives an Event & EventHint as arguments.
|
|
194
181
|
*/
|
|
195
|
-
on
|
|
182
|
+
on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
|
|
196
183
|
/**
|
|
197
184
|
* Register a callback for when an event has been sent.
|
|
198
185
|
*/
|
|
199
|
-
on
|
|
186
|
+
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void): void;
|
|
200
187
|
/**
|
|
201
188
|
* Register a callback before a breadcrumb is added.
|
|
202
189
|
*/
|
|
203
|
-
on
|
|
190
|
+
on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
|
|
204
191
|
/**
|
|
205
192
|
* Register a callback when a DSC (Dynamic Sampling Context) is created.
|
|
206
193
|
*/
|
|
207
|
-
on
|
|
194
|
+
on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
|
|
208
195
|
/**
|
|
209
196
|
* Register a callback when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).
|
|
210
197
|
* The option argument may be mutated to drop the span.
|
|
211
198
|
*/
|
|
212
|
-
on
|
|
199
|
+
on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
|
|
213
200
|
drop: boolean;
|
|
214
201
|
}) => void): void;
|
|
215
202
|
/**
|
|
@@ -217,54 +204,62 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
217
204
|
* This should be used to mutate the event. The options argument can hint
|
|
218
205
|
* about what kind of mutation it expects.
|
|
219
206
|
*/
|
|
220
|
-
on
|
|
207
|
+
on(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
|
|
221
208
|
includeReplay?: boolean;
|
|
222
209
|
}) => void): void;
|
|
223
210
|
/**
|
|
224
|
-
* A hook for
|
|
211
|
+
* A hook for the browser tracing integrations to trigger a span start for a page load.
|
|
212
|
+
*/
|
|
213
|
+
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
|
|
214
|
+
/**
|
|
215
|
+
* A hook for browser tracing integrations to trigger a span for a navigation.
|
|
225
216
|
*/
|
|
226
|
-
on
|
|
217
|
+
on(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
|
|
227
218
|
/**
|
|
228
|
-
* A hook
|
|
219
|
+
* A hook that is called when the client is flushing
|
|
229
220
|
*/
|
|
230
|
-
on
|
|
221
|
+
on(hook: 'flush', callback: () => void): void;
|
|
222
|
+
/**
|
|
223
|
+
* A hook that is called when the client is closing
|
|
224
|
+
*/
|
|
225
|
+
on(hook: 'close', callback: () => void): void;
|
|
231
226
|
/**
|
|
232
227
|
* Fire a hook event for transaction start.
|
|
233
228
|
* Expects to be given a transaction as the second argument.
|
|
234
229
|
*/
|
|
235
|
-
emit
|
|
230
|
+
emit(hook: 'startTransaction', transaction: Transaction): void;
|
|
236
231
|
/**
|
|
237
232
|
* Fire a hook event for transaction finish.
|
|
238
233
|
* Expects to be given a transaction as the second argument.
|
|
239
234
|
*/
|
|
240
|
-
emit
|
|
241
|
-
emit
|
|
235
|
+
emit(hook: 'finishTransaction', transaction: Transaction): void;
|
|
236
|
+
emit(hook: 'beforeEnvelope', envelope: Envelope): void;
|
|
242
237
|
/**
|
|
243
238
|
* Fire a hook event before sending an event.
|
|
244
239
|
* This is called right before an event is sent and should not be used to mutate the event.
|
|
245
240
|
* Expects to be given an Event & EventHint as the second/third argument.
|
|
246
241
|
*/
|
|
247
|
-
emit
|
|
242
|
+
emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
|
|
248
243
|
/**
|
|
249
244
|
* Fire a hook event to process events before they are passed to (global) event processors.
|
|
250
245
|
* Expects to be given an Event & EventHint as the second/third argument.
|
|
251
246
|
*/
|
|
252
|
-
emit
|
|
253
|
-
emit
|
|
247
|
+
emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
|
|
248
|
+
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;
|
|
254
249
|
/**
|
|
255
250
|
* Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
|
|
256
251
|
*/
|
|
257
|
-
emit
|
|
252
|
+
emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
|
|
258
253
|
/**
|
|
259
254
|
* Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
|
|
260
255
|
*/
|
|
261
|
-
emit
|
|
256
|
+
emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;
|
|
262
257
|
/**
|
|
263
258
|
* Fire a hook for when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).
|
|
264
259
|
* Expects the OTEL span & as second argument, and an option object as third argument.
|
|
265
260
|
* The option argument may be mutated to drop the span.
|
|
266
261
|
*/
|
|
267
|
-
emit
|
|
262
|
+
emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
|
|
268
263
|
drop: boolean;
|
|
269
264
|
}): void;
|
|
270
265
|
/**
|
|
@@ -272,16 +267,24 @@ export interface Client<O extends ClientOptions = ClientOptions> {
|
|
|
272
267
|
* a feedback event as the second argument, and an optional options object as
|
|
273
268
|
* third argument.
|
|
274
269
|
*/
|
|
275
|
-
emit
|
|
270
|
+
emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
|
|
276
271
|
includeReplay?: boolean;
|
|
277
272
|
}): void;
|
|
278
273
|
/**
|
|
279
|
-
* Emit a hook event for
|
|
274
|
+
* Emit a hook event for browser tracing integrations to trigger a span start for a page load.
|
|
275
|
+
*/
|
|
276
|
+
emit(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
|
|
277
|
+
/**
|
|
278
|
+
* Emit a hook event for browser tracing integrations to trigger a span for a navigation.
|
|
279
|
+
*/
|
|
280
|
+
emit(hook: 'startNavigationSpan', options: StartSpanOptions): void;
|
|
281
|
+
/**
|
|
282
|
+
* Emit a hook event for client flush
|
|
280
283
|
*/
|
|
281
|
-
emit
|
|
284
|
+
emit(hook: 'flush'): void;
|
|
282
285
|
/**
|
|
283
|
-
* Emit a hook event for
|
|
286
|
+
* Emit a hook event for client close
|
|
284
287
|
*/
|
|
285
|
-
emit
|
|
288
|
+
emit(hook: 'close'): void;
|
|
286
289
|
}
|
|
287
290
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown'
|
|
1
|
+
export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown';
|
|
2
2
|
//# sourceMappingURL=datacategory.d.ts.map
|
|
@@ -7,7 +7,6 @@ import { Profile } from './profiling';
|
|
|
7
7
|
import { ReplayEvent, ReplayRecordingData } from './replay';
|
|
8
8
|
import { SdkInfo } from './sdkinfo';
|
|
9
9
|
import { SerializedSession, Session, SessionAggregates } from './session';
|
|
10
|
-
import { Span } from './span';
|
|
11
10
|
import { Transaction } from './transaction';
|
|
12
11
|
import { UserFeedback } from './user';
|
|
13
12
|
export type DynamicSamplingContext = {
|
|
@@ -17,14 +16,10 @@ export type DynamicSamplingContext = {
|
|
|
17
16
|
release?: string;
|
|
18
17
|
environment?: string;
|
|
19
18
|
transaction?: string;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Functonality for segment has been removed.
|
|
22
|
-
*/
|
|
23
|
-
user_segment?: string;
|
|
24
19
|
replay_id?: string;
|
|
25
20
|
sampled?: string;
|
|
26
21
|
};
|
|
27
|
-
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd'
|
|
22
|
+
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd';
|
|
28
23
|
export type BaseEnvelopeHeaders = {
|
|
29
24
|
[key: string]: unknown;
|
|
30
25
|
dsn?: string;
|
|
@@ -85,9 +80,6 @@ type StatsdItemHeaders = {
|
|
|
85
80
|
type ProfileItemHeaders = {
|
|
86
81
|
type: 'profile';
|
|
87
82
|
};
|
|
88
|
-
type SpanItemHeaders = {
|
|
89
|
-
type: 'span';
|
|
90
|
-
};
|
|
91
83
|
export type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;
|
|
92
84
|
export type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;
|
|
93
85
|
export type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>;
|
|
@@ -99,7 +91,6 @@ type ReplayRecordingItem = BaseEnvelopeItem<ReplayRecordingItemHeaders, ReplayRe
|
|
|
99
91
|
export type StatsdItem = BaseEnvelopeItem<StatsdItemHeaders, string>;
|
|
100
92
|
export type FeedbackItem = BaseEnvelopeItem<FeedbackItemHeaders, FeedbackEvent>;
|
|
101
93
|
export type ProfileItem = BaseEnvelopeItem<ProfileItemHeaders, Profile>;
|
|
102
|
-
export type SpanItem = BaseEnvelopeItem<SpanItemHeaders, Span>;
|
|
103
94
|
export type EventEnvelopeHeaders = {
|
|
104
95
|
event_id: string;
|
|
105
96
|
sent_at: string;
|
|
@@ -114,7 +105,6 @@ type CheckInEnvelopeHeaders = {
|
|
|
114
105
|
type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
115
106
|
type ReplayEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
116
107
|
type StatsdEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
117
|
-
type SpanEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
118
108
|
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;
|
|
119
109
|
export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
|
|
120
110
|
export type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
|
|
@@ -127,8 +117,7 @@ export type ReplayEnvelope = [
|
|
|
127
117
|
];
|
|
128
118
|
export type CheckInEnvelope = BaseEnvelope<CheckInEnvelopeHeaders, CheckInItem>;
|
|
129
119
|
export type StatsdEnvelope = BaseEnvelope<StatsdEnvelopeHeaders, StatsdItem>;
|
|
130
|
-
export type
|
|
131
|
-
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope | SpanEnvelope;
|
|
120
|
+
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope;
|
|
132
121
|
export type EnvelopeItem = Envelope[1][number];
|
|
133
122
|
export {};
|
|
134
123
|
//# sourceMappingURL=envelope.d.ts.map
|
package/types-ts3.8/event.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Primitive } from './misc';
|
|
|
10
10
|
import { Request } from './request';
|
|
11
11
|
import { CaptureContext } from './scope';
|
|
12
12
|
import { SdkInfo } from './sdkinfo';
|
|
13
|
-
import {
|
|
13
|
+
import { SeverityLevel } from './severity';
|
|
14
14
|
import { MetricSummary, Span, SpanJSON } from './span';
|
|
15
15
|
import { Thread } from './thread';
|
|
16
16
|
import { TransactionSource } from './transaction';
|
|
@@ -25,7 +25,7 @@ export interface Event {
|
|
|
25
25
|
};
|
|
26
26
|
timestamp?: number;
|
|
27
27
|
start_timestamp?: number;
|
|
28
|
-
level?:
|
|
28
|
+
level?: SeverityLevel;
|
|
29
29
|
platform?: string;
|
|
30
30
|
logger?: string;
|
|
31
31
|
server_name?: string;
|
package/types-ts3.8/hub.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Integration, IntegrationClass } from './integration';
|
|
|
6
6
|
import { Primitive } from './misc';
|
|
7
7
|
import { Scope } from './scope';
|
|
8
8
|
import { Session } from './session';
|
|
9
|
-
import {
|
|
9
|
+
import { SeverityLevel } from './severity';
|
|
10
10
|
import { CustomSamplingContext, Transaction, TransactionContext } from './transaction';
|
|
11
11
|
import { User } from './user';
|
|
12
12
|
/**
|
|
@@ -73,7 +73,7 @@ export interface Hub {
|
|
|
73
73
|
* Returns the client of the top stack.
|
|
74
74
|
* @deprecated Use `Sentry.getClient()` instead.
|
|
75
75
|
*/
|
|
76
|
-
getClient():
|
|
76
|
+
getClient<C extends Client>(): C | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* Returns the scope of the top stack.
|
|
79
79
|
* @deprecated Use `Sentry.getCurrentScope()` instead.
|
|
@@ -106,7 +106,7 @@ export interface Hub {
|
|
|
106
106
|
*
|
|
107
107
|
* @deprecated Use `Sentry.captureMessage()` instead.
|
|
108
108
|
*/
|
|
109
|
-
captureMessage(message: string, level?:
|
|
109
|
+
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
|
|
110
110
|
/**
|
|
111
111
|
* Captures a manually created event and sends it to Sentry.
|
|
112
112
|
*
|
|
@@ -116,14 +116,6 @@ export interface Hub {
|
|
|
116
116
|
* @deprecated Use `Sentry.captureEvent()` instead.
|
|
117
117
|
*/
|
|
118
118
|
captureEvent(event: Event, hint?: EventHint): string;
|
|
119
|
-
/**
|
|
120
|
-
* This is the getter for lastEventId.
|
|
121
|
-
*
|
|
122
|
-
* @returns The last event id of a captured event.
|
|
123
|
-
*
|
|
124
|
-
* @deprecated This will be removed in v8.
|
|
125
|
-
*/
|
|
126
|
-
lastEventId(): string | undefined;
|
|
127
119
|
/**
|
|
128
120
|
* Records a new breadcrumb which will be attached to future events.
|
|
129
121
|
*
|
|
@@ -190,35 +182,12 @@ export interface Hub {
|
|
|
190
182
|
setContext(name: string, context: {
|
|
191
183
|
[key: string]: any;
|
|
192
184
|
} | null): void;
|
|
193
|
-
/**
|
|
194
|
-
* Callback to set context information onto the scope.
|
|
195
|
-
*
|
|
196
|
-
* @param callback Callback function that receives Scope.
|
|
197
|
-
* @deprecated Use `getScope()` directly.
|
|
198
|
-
*/
|
|
199
|
-
configureScope(callback: (scope: Scope) => void): void;
|
|
200
|
-
/**
|
|
201
|
-
* For the duration of the callback, this hub will be set as the global current Hub.
|
|
202
|
-
* This function is useful if you want to run your own client and hook into an already initialized one
|
|
203
|
-
* e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.
|
|
204
|
-
*
|
|
205
|
-
* TODO v8: This will be merged with `withScope()`
|
|
206
|
-
*/
|
|
207
|
-
run(callback: (hub: Hub) => void): void;
|
|
208
185
|
/**
|
|
209
186
|
* Returns the integration if installed on the current client.
|
|
210
187
|
*
|
|
211
188
|
* @deprecated Use `Sentry.getClient().getIntegration()` instead.
|
|
212
189
|
*/
|
|
213
190
|
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
214
|
-
/**
|
|
215
|
-
* Returns all trace headers that are currently on the top scope.
|
|
216
|
-
*
|
|
217
|
-
* @deprecated Use `spanToTraceHeader()` instead.
|
|
218
|
-
*/
|
|
219
|
-
traceHeaders(): {
|
|
220
|
-
[key: string]: string;
|
|
221
|
-
};
|
|
222
191
|
/**
|
|
223
192
|
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
224
193
|
*
|