@sentry/types 8.41.0 → 8.42.0
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/README.md +5 -1
- package/build/esm/package.json +1 -1
- package/build/types/index.d.ts +377 -53
- package/build/types/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +377 -53
- package/package.json +4 -1
- package/build/types/attachment.d.ts +0 -29
- package/build/types/attachment.d.ts.map +0 -1
- package/build/types/breadcrumb.d.ts +0 -96
- package/build/types/breadcrumb.d.ts.map +0 -1
- package/build/types/browseroptions.d.ts +0 -25
- package/build/types/browseroptions.d.ts.map +0 -1
- package/build/types/checkin.d.ts +0 -100
- package/build/types/checkin.d.ts.map +0 -1
- package/build/types/client.d.ts +0 -323
- package/build/types/client.d.ts.map +0 -1
- package/build/types/clientreport.d.ts +0 -12
- package/build/types/clientreport.d.ts.map +0 -1
- package/build/types/context.d.ts +0 -119
- package/build/types/context.d.ts.map +0 -1
- package/build/types/datacategory.d.ts +0 -2
- package/build/types/datacategory.d.ts.map +0 -1
- package/build/types/debugMeta.d.ts +0 -28
- package/build/types/debugMeta.d.ts.map +0 -1
- package/build/types/dsn.d.ts +0 -22
- package/build/types/dsn.d.ts.map +0 -1
- package/build/types/envelope.d.ts +0 -127
- package/build/types/envelope.d.ts.map +0 -1
- package/build/types/error.d.ts +0 -7
- package/build/types/error.d.ts.map +0 -1
- package/build/types/event.d.ts +0 -99
- package/build/types/event.d.ts.map +0 -1
- package/build/types/eventprocessor.d.ts +0 -12
- package/build/types/eventprocessor.d.ts.map +0 -1
- package/build/types/exception.d.ts +0 -12
- package/build/types/exception.d.ts.map +0 -1
- package/build/types/extra.d.ts +0 -3
- package/build/types/extra.d.ts.map +0 -1
- package/build/types/feedback/config.d.ts +0 -178
- package/build/types/feedback/config.d.ts.map +0 -1
- package/build/types/feedback/form.d.ts +0 -8
- package/build/types/feedback/form.d.ts.map +0 -1
- package/build/types/feedback/index.d.ts +0 -71
- package/build/types/feedback/index.d.ts.map +0 -1
- package/build/types/feedback/sendFeedback.d.ts +0 -49
- package/build/types/feedback/sendFeedback.d.ts.map +0 -1
- package/build/types/feedback/theme.d.ts +0 -35
- package/build/types/feedback/theme.d.ts.map +0 -1
- package/build/types/hub.d.ts +0 -195
- package/build/types/hub.d.ts.map +0 -1
- package/build/types/instrument.d.ts +0 -69
- package/build/types/instrument.d.ts.map +0 -1
- package/build/types/integration.d.ts +0 -52
- package/build/types/integration.d.ts.map +0 -1
- package/build/types/measurement.d.ts +0 -24
- package/build/types/measurement.d.ts.map +0 -1
- package/build/types/mechanism.d.ts +0 -51
- package/build/types/mechanism.d.ts.map +0 -1
- package/build/types/metrics.d.ts +0 -94
- package/build/types/metrics.d.ts.map +0 -1
- package/build/types/misc.d.ts +0 -53
- package/build/types/misc.d.ts.map +0 -1
- package/build/types/opentelemetry.d.ts +0 -14
- package/build/types/opentelemetry.d.ts.map +0 -1
- package/build/types/options.d.ts +0 -315
- package/build/types/options.d.ts.map +0 -1
- package/build/types/package.d.ts +0 -8
- package/build/types/package.d.ts.map +0 -1
- package/build/types/parameterize.d.ts +0 -5
- package/build/types/parameterize.d.ts.map +0 -1
- package/build/types/polymorphics.d.ts +0 -71
- package/build/types/polymorphics.d.ts.map +0 -1
- package/build/types/profiling.d.ts +0 -143
- package/build/types/profiling.d.ts.map +0 -1
- package/build/types/replay.d.ts +0 -25
- package/build/types/replay.d.ts.map +0 -1
- package/build/types/request.d.ts +0 -38
- package/build/types/request.d.ts.map +0 -1
- package/build/types/runtime.d.ts +0 -6
- package/build/types/runtime.d.ts.map +0 -1
- package/build/types/samplingcontext.d.ts +0 -41
- package/build/types/samplingcontext.d.ts.map +0 -1
- package/build/types/scope.d.ts +0 -241
- package/build/types/scope.d.ts.map +0 -1
- package/build/types/sdkinfo.d.ts +0 -8
- package/build/types/sdkinfo.d.ts.map +0 -1
- package/build/types/sdkmetadata.d.ts +0 -5
- package/build/types/sdkmetadata.d.ts.map +0 -1
- package/build/types/session.d.ts +0 -75
- package/build/types/session.d.ts.map +0 -1
- package/build/types/severity.d.ts +0 -2
- package/build/types/severity.d.ts.map +0 -1
- package/build/types/span.d.ts +0 -222
- package/build/types/span.d.ts.map +0 -1
- package/build/types/spanStatus.d.ts +0 -59
- package/build/types/spanStatus.d.ts.map +0 -1
- package/build/types/stackframe.d.ts +0 -22
- package/build/types/stackframe.d.ts.map +0 -1
- package/build/types/stacktrace.d.ts +0 -10
- package/build/types/stacktrace.d.ts.map +0 -1
- package/build/types/startSpanOptions.d.ts +0 -46
- package/build/types/startSpanOptions.d.ts.map +0 -1
- package/build/types/thread.d.ts +0 -10
- package/build/types/thread.d.ts.map +0 -1
- package/build/types/timedEvent.d.ts +0 -7
- package/build/types/timedEvent.d.ts.map +0 -1
- package/build/types/tracing.d.ts +0 -51
- package/build/types/tracing.d.ts.map +0 -1
- package/build/types/transaction.d.ts +0 -35
- package/build/types/transaction.d.ts.map +0 -1
- package/build/types/transport.d.ts +0 -32
- package/build/types/transport.d.ts.map +0 -1
- package/build/types/user.d.ts +0 -17
- package/build/types/user.d.ts.map +0 -1
- package/build/types/view-hierarchy.d.ts +0 -18
- package/build/types/view-hierarchy.d.ts.map +0 -1
- package/build/types/webfetchapi.d.ts +0 -15
- package/build/types/webfetchapi.d.ts.map +0 -1
- package/build/types/wrappedfunction.d.ts +0 -7
- package/build/types/wrappedfunction.d.ts.map +0 -1
- package/build/types-ts3.8/attachment.d.ts +0 -29
- package/build/types-ts3.8/breadcrumb.d.ts +0 -96
- package/build/types-ts3.8/browseroptions.d.ts +0 -25
- package/build/types-ts3.8/checkin.d.ts +0 -100
- package/build/types-ts3.8/client.d.ts +0 -323
- package/build/types-ts3.8/clientreport.d.ts +0 -12
- package/build/types-ts3.8/context.d.ts +0 -119
- package/build/types-ts3.8/datacategory.d.ts +0 -2
- package/build/types-ts3.8/debugMeta.d.ts +0 -28
- package/build/types-ts3.8/dsn.d.ts +0 -22
- package/build/types-ts3.8/envelope.d.ts +0 -136
- package/build/types-ts3.8/error.d.ts +0 -7
- package/build/types-ts3.8/event.d.ts +0 -99
- package/build/types-ts3.8/eventprocessor.d.ts +0 -12
- package/build/types-ts3.8/exception.d.ts +0 -12
- package/build/types-ts3.8/extra.d.ts +0 -3
- package/build/types-ts3.8/feedback/config.d.ts +0 -178
- package/build/types-ts3.8/feedback/form.d.ts +0 -8
- package/build/types-ts3.8/feedback/index.d.ts +0 -71
- package/build/types-ts3.8/feedback/sendFeedback.d.ts +0 -49
- package/build/types-ts3.8/feedback/theme.d.ts +0 -35
- package/build/types-ts3.8/hub.d.ts +0 -195
- package/build/types-ts3.8/instrument.d.ts +0 -69
- package/build/types-ts3.8/integration.d.ts +0 -52
- package/build/types-ts3.8/measurement.d.ts +0 -24
- package/build/types-ts3.8/mechanism.d.ts +0 -51
- package/build/types-ts3.8/metrics.d.ts +0 -94
- package/build/types-ts3.8/misc.d.ts +0 -53
- package/build/types-ts3.8/opentelemetry.d.ts +0 -17
- package/build/types-ts3.8/options.d.ts +0 -315
- package/build/types-ts3.8/package.d.ts +0 -8
- package/build/types-ts3.8/parameterize.d.ts +0 -5
- package/build/types-ts3.8/polymorphics.d.ts +0 -71
- package/build/types-ts3.8/profiling.d.ts +0 -143
- package/build/types-ts3.8/replay.d.ts +0 -25
- package/build/types-ts3.8/request.d.ts +0 -41
- package/build/types-ts3.8/runtime.d.ts +0 -6
- package/build/types-ts3.8/samplingcontext.d.ts +0 -41
- package/build/types-ts3.8/scope.d.ts +0 -241
- package/build/types-ts3.8/sdkinfo.d.ts +0 -8
- package/build/types-ts3.8/sdkmetadata.d.ts +0 -5
- package/build/types-ts3.8/session.d.ts +0 -75
- package/build/types-ts3.8/severity.d.ts +0 -2
- package/build/types-ts3.8/span.d.ts +0 -222
- package/build/types-ts3.8/spanStatus.d.ts +0 -59
- package/build/types-ts3.8/stackframe.d.ts +0 -22
- package/build/types-ts3.8/stacktrace.d.ts +0 -16
- package/build/types-ts3.8/startSpanOptions.d.ts +0 -46
- package/build/types-ts3.8/thread.d.ts +0 -10
- package/build/types-ts3.8/timedEvent.d.ts +0 -7
- package/build/types-ts3.8/tracing.d.ts +0 -51
- package/build/types-ts3.8/transaction.d.ts +0 -35
- package/build/types-ts3.8/transport.d.ts +0 -32
- package/build/types-ts3.8/user.d.ts +0 -17
- package/build/types-ts3.8/view-hierarchy.d.ts +0 -18
- package/build/types-ts3.8/webfetchapi.d.ts +0 -15
- package/build/types-ts3.8/wrappedfunction.d.ts +0 -7
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ExtractedNodeRequestData, WorkerLocation } from './misc';
|
|
2
|
-
import type { SpanAttributes } from './span';
|
|
3
|
-
/**
|
|
4
|
-
* Context data passed by the user when starting a transaction, to be used by the tracesSampler method.
|
|
5
|
-
*/
|
|
6
|
-
export interface CustomSamplingContext {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Data passed to the `tracesSampler` function, which forms the basis for whatever decisions it might make.
|
|
11
|
-
*
|
|
12
|
-
* Adds default data to data provided by the user. See {@link Hub.startTransaction}
|
|
13
|
-
*/
|
|
14
|
-
export interface SamplingContext extends CustomSamplingContext {
|
|
15
|
-
/**
|
|
16
|
-
* Context data with which transaction being sampled was created.
|
|
17
|
-
* @deprecated This is duplicate data and will be removed eventually.
|
|
18
|
-
*/
|
|
19
|
-
transactionContext: {
|
|
20
|
-
name: string;
|
|
21
|
-
parentSampled?: boolean | undefined;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Sampling decision from the parent transaction, if any.
|
|
25
|
-
*/
|
|
26
|
-
parentSampled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Object representing the URL of the current page or worker script. Passed by default when using the `BrowserTracing`
|
|
29
|
-
* integration.
|
|
30
|
-
*/
|
|
31
|
-
location?: WorkerLocation;
|
|
32
|
-
/**
|
|
33
|
-
* Object representing the incoming request to a node server. Passed by default when using the TracingHandler.
|
|
34
|
-
*/
|
|
35
|
-
request?: ExtractedNodeRequestData;
|
|
36
|
-
/** The name of the span being sampled. */
|
|
37
|
-
name: string;
|
|
38
|
-
/** Initial attributes that have been passed to the span being sampled. */
|
|
39
|
-
attributes?: SpanAttributes;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=samplingcontext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"samplingcontext.d.ts","sourceRoot":"","sources":["../../src/samplingcontext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D;;;OAGG;IACH,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KACrC,CAAC;IAEF;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IAEb,0EAA0E;IAC1E,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B"}
|
package/build/types/scope.d.ts
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import type { Attachment } from './attachment';
|
|
2
|
-
import type { Breadcrumb } from './breadcrumb';
|
|
3
|
-
import type { Client } from './client';
|
|
4
|
-
import type { Context, Contexts } from './context';
|
|
5
|
-
import type { Event, EventHint } from './event';
|
|
6
|
-
import type { EventProcessor } from './eventprocessor';
|
|
7
|
-
import type { Extra, Extras } from './extra';
|
|
8
|
-
import type { Primitive } from './misc';
|
|
9
|
-
import type { RequestSession, Session } from './session';
|
|
10
|
-
import type { SeverityLevel } from './severity';
|
|
11
|
-
import type { Span } from './span';
|
|
12
|
-
import type { PropagationContext } from './tracing';
|
|
13
|
-
import type { User } from './user';
|
|
14
|
-
/** JSDocs */
|
|
15
|
-
export type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);
|
|
16
|
-
/** JSDocs */
|
|
17
|
-
export interface ScopeContext {
|
|
18
|
-
user: User;
|
|
19
|
-
level: SeverityLevel;
|
|
20
|
-
extra: Extras;
|
|
21
|
-
contexts: Contexts;
|
|
22
|
-
tags: {
|
|
23
|
-
[key: string]: Primitive;
|
|
24
|
-
};
|
|
25
|
-
fingerprint: string[];
|
|
26
|
-
requestSession: RequestSession;
|
|
27
|
-
propagationContext: PropagationContext;
|
|
28
|
-
}
|
|
29
|
-
export interface ScopeData {
|
|
30
|
-
eventProcessors: EventProcessor[];
|
|
31
|
-
breadcrumbs: Breadcrumb[];
|
|
32
|
-
user: User;
|
|
33
|
-
tags: {
|
|
34
|
-
[key: string]: Primitive;
|
|
35
|
-
};
|
|
36
|
-
extra: Extras;
|
|
37
|
-
contexts: Contexts;
|
|
38
|
-
attachments: Attachment[];
|
|
39
|
-
propagationContext: PropagationContext;
|
|
40
|
-
sdkProcessingMetadata: {
|
|
41
|
-
[key: string]: unknown;
|
|
42
|
-
};
|
|
43
|
-
fingerprint: string[];
|
|
44
|
-
level?: SeverityLevel;
|
|
45
|
-
transactionName?: string;
|
|
46
|
-
span?: Span;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Holds additional event information.
|
|
50
|
-
*/
|
|
51
|
-
export interface Scope {
|
|
52
|
-
/**
|
|
53
|
-
* Update the client on the scope.
|
|
54
|
-
*/
|
|
55
|
-
setClient(client: Client | undefined): void;
|
|
56
|
-
/**
|
|
57
|
-
* Get the client assigned to this scope.
|
|
58
|
-
*
|
|
59
|
-
* It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.
|
|
60
|
-
*/
|
|
61
|
-
getClient<C extends Client>(): C | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Sets the last event id on the scope.
|
|
64
|
-
* @param lastEventId The last event id of a captured event.
|
|
65
|
-
*/
|
|
66
|
-
setLastEventId(lastEventId: string | undefined): void;
|
|
67
|
-
/**
|
|
68
|
-
* This is the getter for lastEventId.
|
|
69
|
-
* @returns The last event id of a captured event.
|
|
70
|
-
*/
|
|
71
|
-
lastEventId(): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Add internal on change listener. Used for sub SDKs that need to store the scope.
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
addScopeListener(callback: (scope: Scope) => void): void;
|
|
77
|
-
/** Add new event processor that will be called during event processing. */
|
|
78
|
-
addEventProcessor(callback: EventProcessor): this;
|
|
79
|
-
/** Get the data of this scope, which is applied to an event during processing. */
|
|
80
|
-
getScopeData(): ScopeData;
|
|
81
|
-
/**
|
|
82
|
-
* Updates user context information for future events.
|
|
83
|
-
*
|
|
84
|
-
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
85
|
-
*/
|
|
86
|
-
setUser(user: User | null): this;
|
|
87
|
-
/**
|
|
88
|
-
* Returns the `User` if there is one
|
|
89
|
-
*/
|
|
90
|
-
getUser(): User | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Set an object that will be merged sent as tags data with the event.
|
|
93
|
-
* @param tags Tags context object to merge into current context.
|
|
94
|
-
*/
|
|
95
|
-
setTags(tags: {
|
|
96
|
-
[key: string]: Primitive;
|
|
97
|
-
}): this;
|
|
98
|
-
/**
|
|
99
|
-
* Set key:value that will be sent as tags data with the event.
|
|
100
|
-
*
|
|
101
|
-
* Can also be used to unset a tag by passing `undefined`.
|
|
102
|
-
*
|
|
103
|
-
* @param key String key of tag
|
|
104
|
-
* @param value Value of tag
|
|
105
|
-
*/
|
|
106
|
-
setTag(key: string, value: Primitive): this;
|
|
107
|
-
/**
|
|
108
|
-
* Set an object that will be merged sent as extra data with the event.
|
|
109
|
-
* @param extras Extras object to merge into current context.
|
|
110
|
-
*/
|
|
111
|
-
setExtras(extras: Extras): this;
|
|
112
|
-
/**
|
|
113
|
-
* Set key:value that will be sent as extra data with the event.
|
|
114
|
-
* @param key String of extra
|
|
115
|
-
* @param extra Any kind of data. This data will be normalized.
|
|
116
|
-
*/
|
|
117
|
-
setExtra(key: string, extra: Extra): this;
|
|
118
|
-
/**
|
|
119
|
-
* Sets the fingerprint on the scope to send with the events.
|
|
120
|
-
* @param fingerprint string[] to group events in Sentry.
|
|
121
|
-
*/
|
|
122
|
-
setFingerprint(fingerprint: string[]): this;
|
|
123
|
-
/**
|
|
124
|
-
* Sets the level on the scope for future events.
|
|
125
|
-
* @param level string {@link SeverityLevel}
|
|
126
|
-
*/
|
|
127
|
-
setLevel(level: SeverityLevel): this;
|
|
128
|
-
/**
|
|
129
|
-
* Sets the transaction name on the scope so that the name of the transaction
|
|
130
|
-
* (e.g. taken server route or page location) is attached to future events.
|
|
131
|
-
*
|
|
132
|
-
* IMPORTANT: Calling this function does NOT change the name of the currently active
|
|
133
|
-
* span. If you want to change the name of the active span, use `span.updateName()`
|
|
134
|
-
* instead.
|
|
135
|
-
*
|
|
136
|
-
* By default, the SDK updates the scope's transaction name automatically on sensible
|
|
137
|
-
* occasions, such as a page navigation or when handling a new request on the server.
|
|
138
|
-
*/
|
|
139
|
-
setTransactionName(name?: string): this;
|
|
140
|
-
/**
|
|
141
|
-
* Sets context data with the given name.
|
|
142
|
-
* @param name of the context
|
|
143
|
-
* @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.
|
|
144
|
-
*/
|
|
145
|
-
setContext(name: string, context: Context | null): this;
|
|
146
|
-
/**
|
|
147
|
-
* Returns the `Session` if there is one
|
|
148
|
-
*/
|
|
149
|
-
getSession(): Session | undefined;
|
|
150
|
-
/**
|
|
151
|
-
* Sets the `Session` on the scope
|
|
152
|
-
*/
|
|
153
|
-
setSession(session?: Session): this;
|
|
154
|
-
/**
|
|
155
|
-
* Returns the `RequestSession` if there is one
|
|
156
|
-
*/
|
|
157
|
-
getRequestSession(): RequestSession | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* Sets the `RequestSession` on the scope
|
|
160
|
-
*/
|
|
161
|
-
setRequestSession(requestSession?: RequestSession): this;
|
|
162
|
-
/**
|
|
163
|
-
* Updates the scope with provided data. Can work in three variations:
|
|
164
|
-
* - plain object containing updatable attributes
|
|
165
|
-
* - Scope instance that'll extract the attributes from
|
|
166
|
-
* - callback function that'll receive the current scope as an argument and allow for modifications
|
|
167
|
-
* @param captureContext scope modifier to be used
|
|
168
|
-
*/
|
|
169
|
-
update(captureContext?: CaptureContext): this;
|
|
170
|
-
/** Clears the current scope and resets its properties. */
|
|
171
|
-
clear(): this;
|
|
172
|
-
/**
|
|
173
|
-
* Adds a breadcrumb to the scope
|
|
174
|
-
* @param breadcrumb Breadcrumb
|
|
175
|
-
* @param maxBreadcrumbs number of max breadcrumbs to merged into event.
|
|
176
|
-
*/
|
|
177
|
-
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
|
|
178
|
-
/**
|
|
179
|
-
* Get the last breadcrumb.
|
|
180
|
-
*/
|
|
181
|
-
getLastBreadcrumb(): Breadcrumb | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* Clears all breadcrumbs from the scope.
|
|
184
|
-
*/
|
|
185
|
-
clearBreadcrumbs(): this;
|
|
186
|
-
/**
|
|
187
|
-
* Adds an attachment to the scope
|
|
188
|
-
* @param attachment Attachment options
|
|
189
|
-
*/
|
|
190
|
-
addAttachment(attachment: Attachment): this;
|
|
191
|
-
/**
|
|
192
|
-
* Clears attachments from the scope
|
|
193
|
-
*/
|
|
194
|
-
clearAttachments(): this;
|
|
195
|
-
/**
|
|
196
|
-
* Add data which will be accessible during event processing but won't get sent to Sentry.
|
|
197
|
-
*
|
|
198
|
-
* TODO(v9): We should type this stricter, so that e.g. `normalizedRequest` is strictly typed.
|
|
199
|
-
*/
|
|
200
|
-
setSDKProcessingMetadata(newData: {
|
|
201
|
-
[key: string]: unknown;
|
|
202
|
-
}): this;
|
|
203
|
-
/**
|
|
204
|
-
* Add propagation context to the scope, used for distributed tracing
|
|
205
|
-
*/
|
|
206
|
-
setPropagationContext(context: PropagationContext): this;
|
|
207
|
-
/**
|
|
208
|
-
* Get propagation context from the scope, used for distributed tracing
|
|
209
|
-
*/
|
|
210
|
-
getPropagationContext(): PropagationContext;
|
|
211
|
-
/**
|
|
212
|
-
* Capture an exception for this scope.
|
|
213
|
-
*
|
|
214
|
-
* @param exception The exception to capture.
|
|
215
|
-
* @param hint Optional additional data to attach to the Sentry event.
|
|
216
|
-
* @returns the id of the captured Sentry event.
|
|
217
|
-
*/
|
|
218
|
-
captureException(exception: unknown, hint?: EventHint): string;
|
|
219
|
-
/**
|
|
220
|
-
* Capture a message for this scope.
|
|
221
|
-
*
|
|
222
|
-
* @param message The message to capture.
|
|
223
|
-
* @param level An optional severity level to report the message with.
|
|
224
|
-
* @param hint Optional additional data to attach to the Sentry event.
|
|
225
|
-
* @returns the id of the captured message.
|
|
226
|
-
*/
|
|
227
|
-
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
|
|
228
|
-
/**
|
|
229
|
-
* Capture a Sentry event for this scope.
|
|
230
|
-
*
|
|
231
|
-
* @param event The event to capture.
|
|
232
|
-
* @param hint Optional additional data to attach to the Sentry event.
|
|
233
|
-
* @returns the id of the captured event.
|
|
234
|
-
*/
|
|
235
|
-
captureEvent(event: Event, hint?: EventHint): string;
|
|
236
|
-
/**
|
|
237
|
-
* Clone all data from this scope into a new scope.
|
|
238
|
-
*/
|
|
239
|
-
clone(): Scope;
|
|
240
|
-
}
|
|
241
|
-
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":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OAAO,EAAE,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdkmetadata.d.ts","sourceRoot":"","sources":["../../src/sdkmetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|
package/build/types/session.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { User } from './user';
|
|
2
|
-
export interface RequestSession {
|
|
3
|
-
status?: RequestSessionStatus;
|
|
4
|
-
}
|
|
5
|
-
export interface Session {
|
|
6
|
-
sid: string;
|
|
7
|
-
did?: string | number;
|
|
8
|
-
init: boolean;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
started: number;
|
|
11
|
-
duration?: number;
|
|
12
|
-
status: SessionStatus;
|
|
13
|
-
release?: string;
|
|
14
|
-
environment?: string;
|
|
15
|
-
userAgent?: string;
|
|
16
|
-
ipAddress?: string;
|
|
17
|
-
errors: number;
|
|
18
|
-
user?: User | null;
|
|
19
|
-
ignoreDuration: boolean;
|
|
20
|
-
abnormal_mechanism?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Overrides default JSON serialization of the Session because
|
|
23
|
-
* the Sentry servers expect a slightly different schema of a session
|
|
24
|
-
* which is described in the interface @see SerializedSession in this file.
|
|
25
|
-
*
|
|
26
|
-
* @return a Sentry-backend conforming JSON object of the session
|
|
27
|
-
*/
|
|
28
|
-
toJSON(): SerializedSession;
|
|
29
|
-
}
|
|
30
|
-
export type SessionContext = Partial<Session>;
|
|
31
|
-
export type SessionStatus = 'ok' | 'exited' | 'crashed' | 'abnormal';
|
|
32
|
-
export type RequestSessionStatus = 'ok' | 'errored' | 'crashed';
|
|
33
|
-
/** JSDoc */
|
|
34
|
-
export interface SessionAggregates {
|
|
35
|
-
attrs?: {
|
|
36
|
-
environment?: string;
|
|
37
|
-
release?: string;
|
|
38
|
-
};
|
|
39
|
-
aggregates: Array<AggregationCounts>;
|
|
40
|
-
}
|
|
41
|
-
export interface SessionFlusherLike {
|
|
42
|
-
/**
|
|
43
|
-
* Increments the Session Status bucket in SessionAggregates Object corresponding to the status of the session
|
|
44
|
-
* captured
|
|
45
|
-
*/
|
|
46
|
-
incrementSessionStatusCount(): void;
|
|
47
|
-
/** Empties Aggregate Buckets and Sends them to Transport Buffer */
|
|
48
|
-
flush(): void;
|
|
49
|
-
/** Clears setInterval and calls flush */
|
|
50
|
-
close(): void;
|
|
51
|
-
}
|
|
52
|
-
export interface AggregationCounts {
|
|
53
|
-
started: string;
|
|
54
|
-
errored?: number;
|
|
55
|
-
exited?: number;
|
|
56
|
-
crashed?: number;
|
|
57
|
-
}
|
|
58
|
-
export interface SerializedSession {
|
|
59
|
-
init: boolean;
|
|
60
|
-
sid: string;
|
|
61
|
-
did?: string;
|
|
62
|
-
timestamp: string;
|
|
63
|
-
started: string;
|
|
64
|
-
duration?: number;
|
|
65
|
-
status: SessionStatus;
|
|
66
|
-
errors: number;
|
|
67
|
-
abnormal_mechanism?: string;
|
|
68
|
-
attrs?: {
|
|
69
|
-
release?: string;
|
|
70
|
-
environment?: string;
|
|
71
|
-
user_agent?: string;
|
|
72
|
-
ip_address?: string;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IAEd,SAA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AiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/severity.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
package/build/types/span.d.ts
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import type { Measurements } from './measurement';
|
|
2
|
-
import type { Primitive } from './misc';
|
|
3
|
-
import type { HrTime } from './opentelemetry';
|
|
4
|
-
import type { SpanStatus } from './spanStatus';
|
|
5
|
-
import type { TransactionSource } from './transaction';
|
|
6
|
-
type SpanOriginType = 'manual' | 'auto';
|
|
7
|
-
type SpanOriginCategory = string;
|
|
8
|
-
type SpanOriginIntegrationName = string;
|
|
9
|
-
type SpanOriginIntegrationPart = string;
|
|
10
|
-
export type SpanOrigin = SpanOriginType | `${SpanOriginType}.${SpanOriginCategory}` | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}` | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}.${SpanOriginIntegrationPart}`;
|
|
11
|
-
export type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
12
|
-
export type SpanAttributes = Partial<{
|
|
13
|
-
'sentry.origin': string;
|
|
14
|
-
'sentry.op': string;
|
|
15
|
-
'sentry.source': TransactionSource;
|
|
16
|
-
'sentry.sample_rate': number;
|
|
17
|
-
}> & Record<string, SpanAttributeValue | undefined>;
|
|
18
|
-
export type MetricSummary = {
|
|
19
|
-
min: number;
|
|
20
|
-
max: number;
|
|
21
|
-
count: number;
|
|
22
|
-
sum: number;
|
|
23
|
-
tags?: Record<string, Primitive> | undefined;
|
|
24
|
-
};
|
|
25
|
-
/** This type is aligned with the OpenTelemetry TimeInput type. */
|
|
26
|
-
export type SpanTimeInput = HrTime | number | Date;
|
|
27
|
-
/** A JSON representation of a span. */
|
|
28
|
-
export interface SpanJSON {
|
|
29
|
-
data?: {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
};
|
|
32
|
-
description?: string;
|
|
33
|
-
op?: string;
|
|
34
|
-
parent_span_id?: string;
|
|
35
|
-
span_id: string;
|
|
36
|
-
start_timestamp: number;
|
|
37
|
-
status?: string;
|
|
38
|
-
timestamp?: number;
|
|
39
|
-
trace_id: string;
|
|
40
|
-
origin?: SpanOrigin;
|
|
41
|
-
_metrics_summary?: Record<string, Array<MetricSummary>>;
|
|
42
|
-
profile_id?: string;
|
|
43
|
-
exclusive_time?: number;
|
|
44
|
-
measurements?: Measurements;
|
|
45
|
-
is_segment?: boolean;
|
|
46
|
-
segment_id?: string;
|
|
47
|
-
}
|
|
48
|
-
type TraceFlagNone = 0;
|
|
49
|
-
type TraceFlagSampled = 1;
|
|
50
|
-
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
|
|
51
|
-
export interface TraceState {
|
|
52
|
-
/**
|
|
53
|
-
* Create a new TraceState which inherits from this TraceState and has the
|
|
54
|
-
* given key set.
|
|
55
|
-
* The new entry will always be added in the front of the list of states.
|
|
56
|
-
*
|
|
57
|
-
* @param key key of the TraceState entry.
|
|
58
|
-
* @param value value of the TraceState entry.
|
|
59
|
-
*/
|
|
60
|
-
set(key: string, value: string): TraceState;
|
|
61
|
-
/**
|
|
62
|
-
* Return a new TraceState which inherits from this TraceState but does not
|
|
63
|
-
* contain the given key.
|
|
64
|
-
*
|
|
65
|
-
* @param key the key for the TraceState entry to be removed.
|
|
66
|
-
*/
|
|
67
|
-
unset(key: string): TraceState;
|
|
68
|
-
/**
|
|
69
|
-
* Returns the value to which the specified key is mapped, or `undefined` if
|
|
70
|
-
* this map contains no mapping for the key.
|
|
71
|
-
*
|
|
72
|
-
* @param key with which the specified value is to be associated.
|
|
73
|
-
* @returns the value to which the specified key is mapped, or `undefined` if
|
|
74
|
-
* this map contains no mapping for the key.
|
|
75
|
-
*/
|
|
76
|
-
get(key: string): string | undefined;
|
|
77
|
-
/**
|
|
78
|
-
* Serializes the TraceState to a `list` as defined below. The `list` is a
|
|
79
|
-
* series of `list-members` separated by commas `,`, and a list-member is a
|
|
80
|
-
* key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
|
|
81
|
-
* surrounding `list-members` are ignored. There can be a maximum of 32
|
|
82
|
-
* `list-members` in a `list`.
|
|
83
|
-
*
|
|
84
|
-
* @returns the serialized string.
|
|
85
|
-
*/
|
|
86
|
-
serialize(): string;
|
|
87
|
-
}
|
|
88
|
-
export interface SpanContextData {
|
|
89
|
-
/**
|
|
90
|
-
* The ID of the trace that this span belongs to. It is worldwide unique
|
|
91
|
-
* with practically sufficient probability by being made as 16 randomly
|
|
92
|
-
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
|
|
93
|
-
* 128 bits.
|
|
94
|
-
*/
|
|
95
|
-
traceId: string;
|
|
96
|
-
/**
|
|
97
|
-
* The ID of the Span. It is globally unique with practically sufficient
|
|
98
|
-
* probability by being made as 8 randomly generated bytes, encoded as a 16
|
|
99
|
-
* lowercase hex characters corresponding to 64 bits.
|
|
100
|
-
*/
|
|
101
|
-
spanId: string;
|
|
102
|
-
/**
|
|
103
|
-
* Only true if the SentrySpanArguments was propagated from a remote parent.
|
|
104
|
-
*/
|
|
105
|
-
isRemote?: boolean | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Trace flags to propagate.
|
|
108
|
-
*
|
|
109
|
-
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
|
|
110
|
-
* sampled or not. When set, the least significant bit documents that the
|
|
111
|
-
* caller may have recorded trace data. A caller who does not record trace
|
|
112
|
-
* data out-of-band leaves this flag unset.
|
|
113
|
-
*/
|
|
114
|
-
traceFlags: TraceFlag | number;
|
|
115
|
-
/** In OpenTelemetry, this can be used to store trace state, which are basically key-value pairs. */
|
|
116
|
-
traceState?: TraceState | undefined;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Interface holding all properties that can be set on a Span on creation.
|
|
120
|
-
* This is only used for the legacy span/transaction creation and will go away in v8.
|
|
121
|
-
*/
|
|
122
|
-
export interface SentrySpanArguments {
|
|
123
|
-
/**
|
|
124
|
-
* Human-readable identifier for the span.
|
|
125
|
-
*/
|
|
126
|
-
name?: string | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Operation of the Span.
|
|
129
|
-
*/
|
|
130
|
-
op?: string | undefined;
|
|
131
|
-
/**
|
|
132
|
-
* Parent Span ID
|
|
133
|
-
*/
|
|
134
|
-
parentSpanId?: string | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Was this span chosen to be sent as part of the sample?
|
|
137
|
-
*/
|
|
138
|
-
sampled?: boolean | undefined;
|
|
139
|
-
/**
|
|
140
|
-
* Span ID
|
|
141
|
-
*/
|
|
142
|
-
spanId?: string | undefined;
|
|
143
|
-
/**
|
|
144
|
-
* Trace ID
|
|
145
|
-
*/
|
|
146
|
-
traceId?: string | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* Attributes of the Span.
|
|
149
|
-
*/
|
|
150
|
-
attributes?: SpanAttributes;
|
|
151
|
-
/**
|
|
152
|
-
* Timestamp in seconds (epoch time) indicating when the span started.
|
|
153
|
-
*/
|
|
154
|
-
startTimestamp?: number | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Timestamp in seconds (epoch time) indicating when the span ended.
|
|
157
|
-
*/
|
|
158
|
-
endTimestamp?: number | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* Set to `true` if this span should be sent as a standalone segment span
|
|
161
|
-
* as opposed to a transaction.
|
|
162
|
-
*
|
|
163
|
-
* @experimental this option is currently experimental and should only be
|
|
164
|
-
* used within SDK code. It might be removed or changed in the future.
|
|
165
|
-
*/
|
|
166
|
-
isStandalone?: boolean | undefined;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* A generic Span which holds trace data.
|
|
170
|
-
*/
|
|
171
|
-
export interface Span {
|
|
172
|
-
/**
|
|
173
|
-
* Get context data for this span.
|
|
174
|
-
* This includes the spanId & the traceId.
|
|
175
|
-
*/
|
|
176
|
-
spanContext(): SpanContextData;
|
|
177
|
-
/**
|
|
178
|
-
* End the current span.
|
|
179
|
-
*/
|
|
180
|
-
end(endTimestamp?: SpanTimeInput): void;
|
|
181
|
-
/**
|
|
182
|
-
* Set a single attribute on the span.
|
|
183
|
-
* Set it to `undefined` to remove the attribute.
|
|
184
|
-
*/
|
|
185
|
-
setAttribute(key: string, value: SpanAttributeValue | undefined): this;
|
|
186
|
-
/**
|
|
187
|
-
* Set multiple attributes on the span.
|
|
188
|
-
* Any attribute set to `undefined` will be removed.
|
|
189
|
-
*/
|
|
190
|
-
setAttributes(attributes: SpanAttributes): this;
|
|
191
|
-
/**
|
|
192
|
-
* Sets the status attribute on the current span.
|
|
193
|
-
*/
|
|
194
|
-
setStatus(status: SpanStatus): this;
|
|
195
|
-
/**
|
|
196
|
-
* Update the name of the span.
|
|
197
|
-
*/
|
|
198
|
-
updateName(name: string): this;
|
|
199
|
-
/**
|
|
200
|
-
* If this is span is actually recording data.
|
|
201
|
-
* This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
|
|
202
|
-
*/
|
|
203
|
-
isRecording(): boolean;
|
|
204
|
-
/**
|
|
205
|
-
* Adds an event to the Span.
|
|
206
|
-
*/
|
|
207
|
-
addEvent(name: string, attributesOrStartTime?: SpanAttributes | SpanTimeInput, startTime?: SpanTimeInput): this;
|
|
208
|
-
/**
|
|
209
|
-
* NOT USED IN SENTRY, only added for compliance with OTEL Span interface
|
|
210
|
-
*/
|
|
211
|
-
addLink(link: unknown): this;
|
|
212
|
-
/**
|
|
213
|
-
* NOT USED IN SENTRY, only added for compliance with OTEL Span interface
|
|
214
|
-
*/
|
|
215
|
-
addLinks(links: unknown): this;
|
|
216
|
-
/**
|
|
217
|
-
* NOT USED IN SENTRY, only added for compliance with OTEL Span interface
|
|
218
|
-
*/
|
|
219
|
-
recordException(exception: unknown, time?: number): void;
|
|
220
|
-
}
|
|
221
|
-
export {};
|
|
222
|
-
//# sourceMappingURL=span.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,KAAK,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxC,KAAK,kBAAkB,GAAG,MAAM,CAAC;AACjC,KAAK,yBAAyB,GAAG,MAAM,CAAC;AACxC,KAAK,yBAAyB,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,GAAG,cAAc,IAAI,kBAAkB,EAAE,GACzC,GAAG,cAAc,IAAI,kBAAkB,IAAI,yBAAyB,EAAE,GACtE,GAAG,cAAc,I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