@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
package/build/types/hub.d.ts
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';
|
|
2
|
-
import type { Client } from './client';
|
|
3
|
-
import type { Event, EventHint } from './event';
|
|
4
|
-
import type { Extra, Extras } from './extra';
|
|
5
|
-
import type { Integration, IntegrationClass } from './integration';
|
|
6
|
-
import type { Primitive } from './misc';
|
|
7
|
-
import type { Scope } from './scope';
|
|
8
|
-
import type { Session } from './session';
|
|
9
|
-
import type { SeverityLevel } from './severity';
|
|
10
|
-
import type { User } from './user';
|
|
11
|
-
/**
|
|
12
|
-
* Internal class used to make sure we always have the latest internal functions
|
|
13
|
-
* working in case we have a version conflict.
|
|
14
|
-
*
|
|
15
|
-
* @deprecated This interface will be removed in a future major version of the SDK in favour of
|
|
16
|
-
* `Scope` and `Client` objects and APIs.
|
|
17
|
-
*
|
|
18
|
-
* Most APIs referencing `Hub` are themselves and will be removed in version 8 of the SDK. More information:
|
|
19
|
-
* - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export interface Hub {
|
|
23
|
-
/**
|
|
24
|
-
* This binds the given client to the current scope.
|
|
25
|
-
* @param client An SDK client (client) instance.
|
|
26
|
-
*
|
|
27
|
-
* @deprecated Use `initAndBind()` directly.
|
|
28
|
-
*/
|
|
29
|
-
bindClient(client?: Client): void;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new scope with and executes the given operation within.
|
|
32
|
-
* The scope is automatically removed once the operation
|
|
33
|
-
* finishes or throws.
|
|
34
|
-
*
|
|
35
|
-
* This is essentially a convenience function for:
|
|
36
|
-
*
|
|
37
|
-
* pushScope();
|
|
38
|
-
* callback();
|
|
39
|
-
* popScope();
|
|
40
|
-
*
|
|
41
|
-
* @param callback that will be enclosed into push/popScope.
|
|
42
|
-
*
|
|
43
|
-
* @deprecated Use `Sentry.withScope()` instead.
|
|
44
|
-
*/
|
|
45
|
-
withScope<T>(callback: (scope: Scope) => T): T;
|
|
46
|
-
/**
|
|
47
|
-
* Returns the client of the top stack.
|
|
48
|
-
* @deprecated Use `Sentry.getClient()` instead.
|
|
49
|
-
*/
|
|
50
|
-
getClient<C extends Client>(): C | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the scope of the top stack.
|
|
53
|
-
* @deprecated Use `Sentry.getCurrentScope()` instead.
|
|
54
|
-
*/
|
|
55
|
-
getScope(): Scope;
|
|
56
|
-
/**
|
|
57
|
-
* Get the currently active isolation scope.
|
|
58
|
-
* The isolation scope is used to isolate data between different hubs.
|
|
59
|
-
*
|
|
60
|
-
* @deprecated Use `Sentry.getIsolationScope()` instead.
|
|
61
|
-
*/
|
|
62
|
-
getIsolationScope(): Scope;
|
|
63
|
-
/**
|
|
64
|
-
* Captures an exception event and sends it to Sentry.
|
|
65
|
-
*
|
|
66
|
-
* @param exception An exception-like object.
|
|
67
|
-
* @param hint May contain additional information about the original exception.
|
|
68
|
-
* @returns The generated eventId.
|
|
69
|
-
*
|
|
70
|
-
* @deprecated Use `Sentry.captureException()` instead.
|
|
71
|
-
*/
|
|
72
|
-
captureException(exception: any, hint?: EventHint): string;
|
|
73
|
-
/**
|
|
74
|
-
* Captures a message event and sends it to Sentry.
|
|
75
|
-
*
|
|
76
|
-
* @param message The message to send to Sentry.
|
|
77
|
-
* @param level Define the level of the message.
|
|
78
|
-
* @param hint May contain additional information about the original exception.
|
|
79
|
-
* @returns The generated eventId.
|
|
80
|
-
*
|
|
81
|
-
* @deprecated Use `Sentry.captureMessage()` instead.
|
|
82
|
-
*/
|
|
83
|
-
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
|
|
84
|
-
/**
|
|
85
|
-
* Captures a manually created event and sends it to Sentry.
|
|
86
|
-
*
|
|
87
|
-
* @param event The event to send to Sentry.
|
|
88
|
-
* @param hint May contain additional information about the original exception.
|
|
89
|
-
*
|
|
90
|
-
* @deprecated Use `Sentry.captureEvent()` instead.
|
|
91
|
-
*/
|
|
92
|
-
captureEvent(event: Event, hint?: EventHint): string;
|
|
93
|
-
/**
|
|
94
|
-
* Records a new breadcrumb which will be attached to future events.
|
|
95
|
-
*
|
|
96
|
-
* Breadcrumbs will be added to subsequent events to provide more context on
|
|
97
|
-
* user's actions prior to an error or crash.
|
|
98
|
-
*
|
|
99
|
-
* @param breadcrumb The breadcrumb to record.
|
|
100
|
-
* @param hint May contain additional information about the original breadcrumb.
|
|
101
|
-
*
|
|
102
|
-
* @deprecated Use `Sentry.addBreadcrumb()` instead.
|
|
103
|
-
*/
|
|
104
|
-
addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
|
|
105
|
-
/**
|
|
106
|
-
* Updates user context information for future events.
|
|
107
|
-
*
|
|
108
|
-
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
109
|
-
*
|
|
110
|
-
* @deprecated Use `Sentry.setUser()` instead.
|
|
111
|
-
*/
|
|
112
|
-
setUser(user: User | null): void;
|
|
113
|
-
/**
|
|
114
|
-
* Set an object that will be merged sent as tags data with the event.
|
|
115
|
-
*
|
|
116
|
-
* @param tags Tags context object to merge into current context.
|
|
117
|
-
*
|
|
118
|
-
* @deprecated Use `Sentry.setTags()` instead.
|
|
119
|
-
*/
|
|
120
|
-
setTags(tags: {
|
|
121
|
-
[key: string]: Primitive;
|
|
122
|
-
}): void;
|
|
123
|
-
/**
|
|
124
|
-
* Set key:value that will be sent as tags data with the event.
|
|
125
|
-
*
|
|
126
|
-
* Can also be used to unset a tag, by passing `undefined`.
|
|
127
|
-
*
|
|
128
|
-
* @param key String key of tag
|
|
129
|
-
* @param value Value of tag
|
|
130
|
-
*
|
|
131
|
-
* @deprecated Use `Sentry.setTag()` instead.
|
|
132
|
-
*/
|
|
133
|
-
setTag(key: string, value: Primitive): void;
|
|
134
|
-
/**
|
|
135
|
-
* Set key:value that will be sent as extra data with the event.
|
|
136
|
-
* @param key String of extra
|
|
137
|
-
* @param extra Any kind of data. This data will be normalized.
|
|
138
|
-
*
|
|
139
|
-
* @deprecated Use `Sentry.setExtra()` instead.
|
|
140
|
-
*/
|
|
141
|
-
setExtra(key: string, extra: Extra): void;
|
|
142
|
-
/**
|
|
143
|
-
* Set an object that will be merged sent as extra data with the event.
|
|
144
|
-
* @param extras Extras object to merge into current context.
|
|
145
|
-
*
|
|
146
|
-
* @deprecated Use `Sentry.setExtras()` instead.
|
|
147
|
-
*/
|
|
148
|
-
setExtras(extras: Extras): void;
|
|
149
|
-
/**
|
|
150
|
-
* Sets context data with the given name.
|
|
151
|
-
* @param name of the context
|
|
152
|
-
* @param context Any kind of data. This data will be normalized.
|
|
153
|
-
*
|
|
154
|
-
* @deprecated Use `Sentry.setContext()` instead.
|
|
155
|
-
*/
|
|
156
|
-
setContext(name: string, context: {
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
} | null): void;
|
|
159
|
-
/**
|
|
160
|
-
* Returns the integration if installed on the current client.
|
|
161
|
-
*
|
|
162
|
-
* @deprecated Use `Sentry.getClient().getIntegration()` instead.
|
|
163
|
-
*/
|
|
164
|
-
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
165
|
-
/**
|
|
166
|
-
* Starts a new `Session`, sets on the current scope and returns it.
|
|
167
|
-
*
|
|
168
|
-
* To finish a `session`, it has to be passed directly to `client.captureSession`, which is done automatically
|
|
169
|
-
* when using `hub.endSession()` for the session currently stored on the scope.
|
|
170
|
-
*
|
|
171
|
-
* When there's already an existing session on the scope, it'll be automatically ended.
|
|
172
|
-
*
|
|
173
|
-
* @param context Optional properties of the new `Session`.
|
|
174
|
-
*
|
|
175
|
-
* @returns The session which was just started
|
|
176
|
-
*
|
|
177
|
-
* @deprecated Use top-level `startSession` instead.
|
|
178
|
-
*/
|
|
179
|
-
startSession(context?: Session): Session;
|
|
180
|
-
/**
|
|
181
|
-
* Ends the session that lives on the current scope and sends it to Sentry
|
|
182
|
-
*
|
|
183
|
-
* @deprecated Use top-level `endSession` instead.
|
|
184
|
-
*/
|
|
185
|
-
endSession(): void;
|
|
186
|
-
/**
|
|
187
|
-
* Sends the current session on the scope to Sentry
|
|
188
|
-
*
|
|
189
|
-
* @param endSession If set the session will be marked as exited and removed from the scope
|
|
190
|
-
*
|
|
191
|
-
* @deprecated Use top-level `captureSession` instead.
|
|
192
|
-
*/
|
|
193
|
-
captureSession(endSession?: boolean): void;
|
|
194
|
-
}
|
|
195
|
-
//# sourceMappingURL=hub.d.ts.map
|
package/build/types/hub.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,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AG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAE5C;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAE1C;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IAEvE;;;;OAIG;IACH,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAEzC;;;;OAIG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;;;OAMG;IACH,cAAc,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5C"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { WebFetchHeaders } from './webfetchapi';
|
|
2
|
-
type XHRSendInput = unknown;
|
|
3
|
-
export type ConsoleLevel = 'debug' | 'info' | 'warn' | 'error' | 'log' | 'assert' | 'trace';
|
|
4
|
-
export interface SentryWrappedXMLHttpRequest {
|
|
5
|
-
__sentry_xhr_v3__?: SentryXhrData;
|
|
6
|
-
__sentry_own_request__?: boolean;
|
|
7
|
-
__sentry_xhr_span_id__?: string;
|
|
8
|
-
setRequestHeader?: (key: string, val: string) => void;
|
|
9
|
-
getResponseHeader?: (key: string) => string | null;
|
|
10
|
-
}
|
|
11
|
-
export interface SentryXhrData {
|
|
12
|
-
method: string;
|
|
13
|
-
url: string;
|
|
14
|
-
status_code?: number;
|
|
15
|
-
body?: XHRSendInput;
|
|
16
|
-
request_body_size?: number;
|
|
17
|
-
response_body_size?: number;
|
|
18
|
-
request_headers: Record<string, string>;
|
|
19
|
-
}
|
|
20
|
-
export interface HandlerDataXhr {
|
|
21
|
-
xhr: SentryWrappedXMLHttpRequest;
|
|
22
|
-
startTimestamp?: number;
|
|
23
|
-
endTimestamp?: number;
|
|
24
|
-
}
|
|
25
|
-
interface SentryFetchData {
|
|
26
|
-
method: string;
|
|
27
|
-
url: string;
|
|
28
|
-
request_body_size?: number;
|
|
29
|
-
response_body_size?: number;
|
|
30
|
-
__span?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface HandlerDataFetch {
|
|
33
|
-
args: any[];
|
|
34
|
-
fetchData: SentryFetchData;
|
|
35
|
-
startTimestamp: number;
|
|
36
|
-
endTimestamp?: number;
|
|
37
|
-
response?: {
|
|
38
|
-
readonly ok: boolean;
|
|
39
|
-
readonly status: number;
|
|
40
|
-
readonly url: string;
|
|
41
|
-
headers: WebFetchHeaders;
|
|
42
|
-
};
|
|
43
|
-
error?: unknown;
|
|
44
|
-
}
|
|
45
|
-
export interface HandlerDataDom {
|
|
46
|
-
event: object | {
|
|
47
|
-
target: object;
|
|
48
|
-
};
|
|
49
|
-
name: string;
|
|
50
|
-
global?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface HandlerDataConsole {
|
|
53
|
-
level: ConsoleLevel;
|
|
54
|
-
args: any[];
|
|
55
|
-
}
|
|
56
|
-
export interface HandlerDataHistory {
|
|
57
|
-
from: string | undefined;
|
|
58
|
-
to: string;
|
|
59
|
-
}
|
|
60
|
-
export interface HandlerDataError {
|
|
61
|
-
column?: number;
|
|
62
|
-
error?: Error;
|
|
63
|
-
line?: number;
|
|
64
|
-
msg: string | object;
|
|
65
|
-
url?: string;
|
|
66
|
-
}
|
|
67
|
-
export type HandlerDataUnhandledRejection = unknown;
|
|
68
|
-
export {};
|
|
69
|
-
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -1 +0,0 @@
|
|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CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,eAAe,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,eAAe,CAAC;KAC1B,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAE7B,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Client } from './client';
|
|
2
|
-
import type { Event, EventHint } from './event';
|
|
3
|
-
/** Integration Class Interface */
|
|
4
|
-
export interface IntegrationClass<T> {
|
|
5
|
-
/**
|
|
6
|
-
* Property that holds the integration name
|
|
7
|
-
*/
|
|
8
|
-
id: string;
|
|
9
|
-
new (...args: any[]): T;
|
|
10
|
-
}
|
|
11
|
-
/** Integration interface */
|
|
12
|
-
export interface Integration {
|
|
13
|
-
/**
|
|
14
|
-
* The name of the integration.
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
/**
|
|
18
|
-
* This hook is only called once, even if multiple clients are created.
|
|
19
|
-
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
|
|
20
|
-
*/
|
|
21
|
-
setupOnce?(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Set up an integration for the given client.
|
|
24
|
-
* Receives the client as argument.
|
|
25
|
-
*
|
|
26
|
-
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
|
|
27
|
-
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
|
|
28
|
-
* should be done in `setupOnce`.
|
|
29
|
-
*/
|
|
30
|
-
setup?(client: Client): void;
|
|
31
|
-
/**
|
|
32
|
-
* This hook is triggered after `setupOnce()` and `setup()` have been called for all integrations.
|
|
33
|
-
* You can use it if it is important that all other integrations have been run before.
|
|
34
|
-
*/
|
|
35
|
-
afterAllSetup?(client: Client): void;
|
|
36
|
-
/**
|
|
37
|
-
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
|
|
38
|
-
*/
|
|
39
|
-
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
|
|
40
|
-
/**
|
|
41
|
-
* An optional hook that allows to process an event.
|
|
42
|
-
* Return `null` to drop the event, or mutate the event & return it.
|
|
43
|
-
* This receives the client that the integration was installed for as third argument.
|
|
44
|
-
*/
|
|
45
|
-
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* An integration in function form.
|
|
49
|
-
* This is expected to return an integration.
|
|
50
|
-
*/
|
|
51
|
-
export type IntegrationFn<IntegrationType = Integration> = (...rest: any[]) => IntegrationType;
|
|
52
|
-
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhD,kCAAkC;AAClC,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB;AAED,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,IAAI,IAAI,CAAC;IAEnB;;;;;;;OAOG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IACH,aAAa,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,eAAe,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAElF;;;;OAIG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CACxG;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,eAAe,GAAG,WAAW,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,eAAe,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A time duration.
|
|
3
|
-
*/
|
|
4
|
-
export type DurationUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week';
|
|
5
|
-
/**
|
|
6
|
-
* Size of information derived from bytes.
|
|
7
|
-
*/
|
|
8
|
-
export type InformationUnit = 'bit' | 'byte' | 'kilobyte' | 'kibibyte' | 'megabyte' | 'mebibyte' | 'gigabyte' | 'terabyte' | 'tebibyte' | 'petabyte' | 'exabyte' | 'exbibyte';
|
|
9
|
-
/**
|
|
10
|
-
* Fractions such as percentages.
|
|
11
|
-
*/
|
|
12
|
-
export type FractionUnit = 'ratio' | 'percent';
|
|
13
|
-
/**
|
|
14
|
-
* Untyped value without a unit.
|
|
15
|
-
*/
|
|
16
|
-
export type NoneUnit = '' | 'none';
|
|
17
|
-
type LiteralUnion<T extends string> = T | Omit<T, T>;
|
|
18
|
-
export type MeasurementUnit = LiteralUnion<DurationUnit | InformationUnit | FractionUnit | NoneUnit>;
|
|
19
|
-
export type Measurements = Record<string, {
|
|
20
|
-
value: number;
|
|
21
|
-
unit: MeasurementUnit;
|
|
22
|
-
}>;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=measurement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/measurement.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAExH;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,MAAM,GACN,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC;AAKnC,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,GAAG,eAAe,GAAG,YAAY,GAAG,QAAQ,CAAC,CAAC;AAErG,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Metadata about a captured exception, intended to provide a hint as to the means by which it was captured.
|
|
3
|
-
*/
|
|
4
|
-
export interface Mechanism {
|
|
5
|
-
/**
|
|
6
|
-
* For now, restricted to `onerror`, `onunhandledrejection` (both obvious), `instrument` (the result of
|
|
7
|
-
* auto-instrumentation), and `generic` (everything else). Converted to a tag on ingest.
|
|
8
|
-
*/
|
|
9
|
-
type: string;
|
|
10
|
-
/**
|
|
11
|
-
* In theory, whether or not the exception has been handled by the user. In practice, whether or not we see it before
|
|
12
|
-
* it hits the global error/rejection handlers, whether through explicit handling by the user or auto instrumentation.
|
|
13
|
-
* Converted to a tag on ingest and used in various ways in the UI.
|
|
14
|
-
*/
|
|
15
|
-
handled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Arbitrary data to be associated with the mechanism (for example, errors coming from event handlers include the
|
|
18
|
-
* handler name and the event target. Will show up in the UI directly above the stacktrace.
|
|
19
|
-
*/
|
|
20
|
-
data?: {
|
|
21
|
-
[key: string]: string | boolean;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* True when `captureException` is called with anything other than an instance of `Error` (or, in the case of browser,
|
|
25
|
-
* an instance of `ErrorEvent`, `DOMError`, or `DOMException`). causing us to create a synthetic error in an attempt
|
|
26
|
-
* to recreate the stacktrace.
|
|
27
|
-
*/
|
|
28
|
-
synthetic?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Describes the source of the exception, in the case that this is a derived (linked or aggregate) error.
|
|
31
|
-
*
|
|
32
|
-
* This should be populated with the name of the property where the exception was found on the parent exception.
|
|
33
|
-
* E.g. "cause", "errors[0]", "errors[1]"
|
|
34
|
-
*/
|
|
35
|
-
source?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Indicates whether the exception is an `AggregateException`.
|
|
38
|
-
*/
|
|
39
|
-
is_exception_group?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* An identifier for the exception inside the `event.exception.values` array. This identifier is referenced to via the
|
|
42
|
-
* `parent_id` attribute to link and aggregate errors.
|
|
43
|
-
*/
|
|
44
|
-
exception_id?: number;
|
|
45
|
-
/**
|
|
46
|
-
* References another exception via the `exception_id` field to indicate that this exception is a child of that
|
|
47
|
-
* exception in the case of aggregate or linked errors.
|
|
48
|
-
*/
|
|
49
|
-
parent_id?: number;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=mechanism.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mechanism.d.ts","sourceRoot":"","sources":["../../src/mechanism.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;KACjC,CAAC;IAEF;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/build/types/metrics.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { Client } from './client';
|
|
2
|
-
import type { DurationUnit, MeasurementUnit } from './measurement';
|
|
3
|
-
import type { Primitive } from './misc';
|
|
4
|
-
export interface MetricData {
|
|
5
|
-
unit?: MeasurementUnit;
|
|
6
|
-
tags?: Record<string, Primitive>;
|
|
7
|
-
timestamp?: number;
|
|
8
|
-
client?: Client;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* An abstract definition of the minimum required API
|
|
12
|
-
* for a metric instance.
|
|
13
|
-
*/
|
|
14
|
-
export interface MetricInstance {
|
|
15
|
-
/**
|
|
16
|
-
* Returns the weight of the metric.
|
|
17
|
-
*/
|
|
18
|
-
weight: number;
|
|
19
|
-
/**
|
|
20
|
-
* Adds a value to a metric.
|
|
21
|
-
*/
|
|
22
|
-
add(value: number | string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Serializes the metric into a statsd format string.
|
|
25
|
-
*/
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
28
|
-
export interface MetricBucketItem {
|
|
29
|
-
metric: MetricInstance;
|
|
30
|
-
timestamp: number;
|
|
31
|
-
metricType: 'c' | 'g' | 's' | 'd';
|
|
32
|
-
name: string;
|
|
33
|
-
unit: MeasurementUnit;
|
|
34
|
-
tags: Record<string, string>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A metrics aggregator that aggregates metrics in memory and flushes them periodically.
|
|
38
|
-
*/
|
|
39
|
-
export interface MetricsAggregator {
|
|
40
|
-
/**
|
|
41
|
-
* Add a metric to the aggregator.
|
|
42
|
-
*/
|
|
43
|
-
add(metricType: 'c' | 'g' | 's' | 'd', name: string, value: number | string, unit?: MeasurementUnit, tags?: Record<string, Primitive>, timestamp?: number): void;
|
|
44
|
-
/**
|
|
45
|
-
* Flushes the current metrics to the transport via the transport.
|
|
46
|
-
*/
|
|
47
|
-
flush(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Shuts down metrics aggregator and clears all metrics.
|
|
50
|
-
*/
|
|
51
|
-
close(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Returns a string representation of the aggregator.
|
|
54
|
-
*/
|
|
55
|
-
toString(): string;
|
|
56
|
-
}
|
|
57
|
-
export interface Metrics {
|
|
58
|
-
/**
|
|
59
|
-
* Adds a value to a counter metric
|
|
60
|
-
*
|
|
61
|
-
* @experimental This API is experimental and might have breaking changes in the future.
|
|
62
|
-
*/
|
|
63
|
-
increment(name: string, value?: number, data?: MetricData): void;
|
|
64
|
-
/**
|
|
65
|
-
* Adds a value to a distribution metric
|
|
66
|
-
*
|
|
67
|
-
* @experimental This API is experimental and might have breaking changes in the future.
|
|
68
|
-
*/
|
|
69
|
-
distribution(name: string, value: number, data?: MetricData): void;
|
|
70
|
-
/**
|
|
71
|
-
* Adds a value to a set metric. Value must be a string or integer.
|
|
72
|
-
*
|
|
73
|
-
* @experimental This API is experimental and might have breaking changes in the future.
|
|
74
|
-
*/
|
|
75
|
-
set(name: string, value: number | string, data?: MetricData): void;
|
|
76
|
-
/**
|
|
77
|
-
* Adds a value to a gauge metric
|
|
78
|
-
*
|
|
79
|
-
* @experimental This API is experimental and might have breaking changes in the future.
|
|
80
|
-
*/
|
|
81
|
-
gauge(name: string, value: number, data?: MetricData): void;
|
|
82
|
-
/**
|
|
83
|
-
* Adds a timing metric.
|
|
84
|
-
* The metric is added as a distribution metric.
|
|
85
|
-
*
|
|
86
|
-
* You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
|
|
87
|
-
* In the latter case, the duration of the callback execution will be captured as a span & a metric.
|
|
88
|
-
*
|
|
89
|
-
* @experimental This API is experimental and might have breaking changes in the future.
|
|
90
|
-
*/
|
|
91
|
-
timing(name: string, value: number, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): void;
|
|
92
|
-
timing<T>(name: string, callback: () => T, unit?: DurationUnit, data?: Omit<MetricData,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-
import type { QueryParams } from './request';
|
|
2
|
-
/**
|
|
3
|
-
* Data extracted from an incoming request to a node server
|
|
4
|
-
*/
|
|
5
|
-
export interface ExtractedNodeRequestData {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
/** Specific headers from the request */
|
|
8
|
-
headers?: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
/** The request's method */
|
|
12
|
-
method?: string;
|
|
13
|
-
/** The request's URL, including query string */
|
|
14
|
-
url?: string;
|
|
15
|
-
/** String representing the cookies sent along with the request */
|
|
16
|
-
cookies?: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
19
|
-
/** The request's query params */
|
|
20
|
-
query_string?: QueryParams;
|
|
21
|
-
/** Any data sent in the request's body, as a JSON string */
|
|
22
|
-
data?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Location object on a service worker's `self` object.
|
|
26
|
-
*
|
|
27
|
-
* See https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation.
|
|
28
|
-
*/
|
|
29
|
-
export interface WorkerLocation {
|
|
30
|
-
/** The protocol scheme of the URL of the script executed in the Worker, including the final ':'. */
|
|
31
|
-
readonly protocol: string;
|
|
32
|
-
/** The host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. */
|
|
33
|
-
readonly host: string;
|
|
34
|
-
/** The domain of the URL of the script executed in the Worker. */
|
|
35
|
-
readonly hostname: string;
|
|
36
|
-
/** The canonical form of the origin of the specific location. */
|
|
37
|
-
readonly origin: string;
|
|
38
|
-
/** The port number of the URL of the script executed in the Worker. */
|
|
39
|
-
readonly port: string;
|
|
40
|
-
/** The path of the URL of the script executed in the Worker, beginning with a '/'. */
|
|
41
|
-
readonly pathname: string;
|
|
42
|
-
/** The parameters (query string) of the URL of the script executed in the Worker, beginning with a '?'. */
|
|
43
|
-
readonly search: string;
|
|
44
|
-
/** The fragment identifier of the URL of the script executed in the Worker, beginning with a '#'. */
|
|
45
|
-
readonly hash: string;
|
|
46
|
-
/** Stringifier that returns the whole URL of the script executed in the Worker. */
|
|
47
|
-
readonly href: string;
|
|
48
|
-
/** Synonym for `href` attribute */
|
|
49
|
-
toString(): string;
|
|
50
|
-
}
|
|
51
|
-
export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
|
|
52
|
-
export type HttpHeaderValue = string | string[] | number | null;
|
|
53
|
-
//# sourceMappingURL=misc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAEnB,wCAAwC;IACxC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEpC,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,kEAAkE;IAClE,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEpC,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;IAE3B,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,2GAA2G;IAC3G,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,2GAA2G;IAC3G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,qGAAqG;IACrG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,mCAAmC;IACnC,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines High-Resolution Time.
|
|
3
|
-
*
|
|
4
|
-
* The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.
|
|
5
|
-
* The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.
|
|
6
|
-
* For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.
|
|
7
|
-
* The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds:
|
|
8
|
-
* HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.
|
|
9
|
-
* The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
|
|
10
|
-
* HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
|
|
11
|
-
* This is represented in HrTime format as [1609504210, 150000000].
|
|
12
|
-
*/
|
|
13
|
-
export type HrTime = [number, number];
|
|
14
|
-
//# sourceMappingURL=opentelemetry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opentelemetry.d.ts","sourceRoot":"","sources":["../../src/opentelemetry.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|